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.


Constructor Index

 o HostRecord(String, int)
Constructs a hostrecord given a hostname and port.

Method Index

 o equals(Object)
Overrides the standard equals method, so that we can compare two hostrecords to see if they are equivalent.
 o getHostname()
Returns the hostname contained within the record.
 o getPort()
Returns the port contained within the record.
 o setHostname(String)
Sets the hostname of the record.
 o setPort(int)
Sets the port of the record.
 o toHostRecordString()
Returns the hostrecord as a string of the form hostname:port.

Constructors

 o 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.

Methods

 o toHostRecordString
 public String toHostRecordString()
Returns the hostrecord as a string of the form hostname:port.

Returns:
String representation of this host entry.
 o getHostname
 public String getHostname()
Returns the hostname contained within the record.

Returns:
Hostname portion of this record.
 o getPort
 public int getPort()
Returns the port contained within the record.

Returns:
Port number associated with this record.
 o setHostname
 public void setHostname(String hostname)
Sets the hostname of the record.

Parameters:
hostname - New hostname for this record.
 o setPort
 public void setPort(int port)
Sets the port of the record.

Parameters:
port - New port for this record.
 o 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