osl.transport.tcp
Class TCPAddress

java.lang.Object
  |
  +--osl.transport.tcp.TCPAddress

public class TCPAddress
extends java.lang.Object
implements PhysicalAddress

This class defines the TCP implementation of the PhysicalAddress class expected by the transport layer component. An address is the inet address/port pair of a TCPInstance server socket.

Version:
$Revision: 1.3 $ ($Date: 1998/06/12 21:33:19 $)
See Also:
PhysicalAddress, Serialized Form

Field Summary
 java.net.InetAddress serverAddr
          The InetAddress for this address.
 int serverPort
          The port for this address.
 
Constructor Summary
TCPAddress()
          Default constructor
TCPAddress(java.net.InetAddress addr, int port)
          Full constructor
 
Method Summary
 boolean equals(java.lang.Object other)
          Compares two instances and returns true if they should be considered "equal".
 int hashCode()
          Returns the hashCode for this instace.
 java.lang.String toString()
          The canoncial toString method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serverAddr

public java.net.InetAddress serverAddr
The InetAddress for this address.

serverPort

public int serverPort
The port for this address.
Constructor Detail

TCPAddress

public TCPAddress()
Default constructor

TCPAddress

public TCPAddress(java.net.InetAddress addr,
                  int port)
Full constructor
Parameters:
addr - The InetAddress to use for this address.
port - The port to use for this address.
Method Detail

equals

public boolean equals(java.lang.Object other)
Compares two instances and returns true if they should be considered "equal".
Parameters:
other - The Object to which we are being compared.
Returns:
Returns true if both objects are TCPAddresses with the same serverAddr and serverPort. Returns false otherwise.
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hashCode for this instace. We require this function so that TCPAddresses hash properly.
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
The canoncial toString method.
Overrides:
toString in class java.lang.Object