Class HostEntry

    • Constructor Detail

      • HostEntry

        public HostEntry​(String name,
                         int jmxPort,
                         int rmiPort)
        Constructor for the HostEntry helper class.
        Parameters:
        name - The name of the remote host
        jmxPort - The JMX port allocated on the remote host
        rmiPort - The RMI port allocated on the remote host
    • Method Detail

      • getJmxPort

        public int getJmxPort()
        Get the JMX port for connections.
        Returns:
        The jmx port.
      • getName

        public String getName()
        Get the host name.
        Returns:
        The name.
      • getRmiPort

        public int getRmiPort()
        Get the RMI port for connections.
        Returns:
        The rmi port.
      • getTime

        public Date getTime()
        Get the time this host was last seen alive.
        Returns:
        The time this host was last seen alive.
      • equals

        public boolean equals​(Object obj)
        Return whether two hosts are equal.

        Two hosts are considered equal, if they have the same name and JMX/RMI ports. However, the time last seen alive is not, and should not be, considered.

        Overrides:
        equals in class Object
        Parameters:
        obj - The host to compare with.
        Returns:
        Whether the two objects represent the same host.
        See Also:
        Object.equals(Object)
      • hashCode

        public int hashCode()
        Return hash code. Coded to be consistent with equals.
        Overrides:
        hashCode in class Object
        Returns:
        Hash code for this object.
        See Also:
        Object.hashCode()
      • toString

        public String toString()
        Get a human readable representation of this host and ports.
        Overrides:
        toString in class Object
        Returns:
        A human readable string.
      • setTime

        public void setTime​(Date time)
        Update the time for when the host was last seen alive.
        Parameters:
        time - The time last seen alive.
        Throws:
        ArgumentNotValid - on null parameter.