Class Host

public class Host
implements java.lang.Comparable

Title:FreeOxy project

Description: This class represents a host in the FreeOxy network. I'm assuming that two different ports on the same IP address are treated as two different hosts. A wrapper class should be able to modify this if the need arises.

Copyright: Copyright (c) 2003

Company:

Version:
1.0
Author:
Ravi Kosuri
Constructor Detail

Host

public Host(java.lang.String ipAddr,
            int port)
Constructor. Initializes to an ip address and a port.
Parameters:
ipAddr -
port -

Method Detail

getIPAddress

java.lang.String getIPAddress()
Returns the ip address of the host
Returns:

getPort

int getPort()
Returns the port of the host
Returns:

toString

public java.lang.String toString()
override toString()
Returns:

compareTo

public int compareTo(java.lang.Object host)
For the comparable interface. Returns 0 if the objects have the same ip and port.
Parameters:
host -
Returns:

equals

public boolean equals(Host host)
returns true if the specified host is the same as me.
Parameters:
host -
Returns: