All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.devtools.SIPNoTE.HostRecord
java.lang.Object
|
+----com.ibm.devtools.SIPNoTE.HostRecord
- public class HostRecord
- extends Object
This class represents a single host to which the user is connected.
The host is made up of the machinename/address and the port number.
-
HostRecord(String, int)
- Constructs a hostrecord given a hostname and port.
-
equals(Object)
- Overrides the standard equals method, so that we can compare
two hostrecords to see if they are equivalent.
-
getHostname()
- Returns the hostname contained within the record.
-
getPort()
- Returns the port contained within the record.
-
setHostname(String)
- Sets the hostname of the record.
-
setPort(int)
- Sets the port of the record.
-
toHostRecordString()
- Returns the hostrecord as a string of the form hostname:port.
HostRecord
public HostRecord(String hostname,
int port)
- Constructs a hostrecord given a hostname and port.
- Parameters:
- hostname - New hostname for this record.
- hostname - New port for this record.
toHostRecordString
public String toHostRecordString()
- Returns the hostrecord as a string of the form hostname:port.
- Returns:
- String representation of this host entry.
getHostname
public String getHostname()
- Returns the hostname contained within the record.
- Returns:
- Hostname portion of this record.
getPort
public int getPort()
- Returns the port contained within the record.
- Returns:
- Port number associated with this record.
setHostname
public void setHostname(String hostname)
- Sets the hostname of the record.
- Parameters:
- hostname - New hostname for this record.
setPort
public void setPort(int port)
- Sets the port of the record.
- Parameters:
- port - New port for this record.
equals
public boolean equals(Object arg)
- Overrides the standard equals method, so that we can compare
two hostrecords to see if they are equivalent. One hostrecord
is equivalent to another if both the names and the ports match.
- Parameters:
- arg - Object to compare to.
- Returns:
- Boolean representing whether or not the comparison was true.
- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index