org.sapia.ubik.mcast
Class InetServerAddress

java.lang.Object
  extended by org.sapia.ubik.mcast.InetServerAddress
All Implemented Interfaces:
java.io.Serializable, ServerAddress

public class InetServerAddress
extends java.lang.Object
implements ServerAddress

Implement a ServerAddress around a an InetAddress and a port.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
Serialized Form

Constructor Summary
InetServerAddress(java.net.InetAddress addr, int port)
          Constructor for InetServerAddress.
 
Method Summary
 boolean equals(java.lang.Object other)
          Implementations should override this method in manner consistent with the method's specification (in the Object class).
 java.net.InetAddress getInetAddress()
          Returns this instance's InetAddress.
 int getPort()
          Returns this instance's port.
 java.lang.String getTransportType()
          Returns the "transport type" of the server corresponding to this server address.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InetServerAddress

public InetServerAddress(java.net.InetAddress addr,
                         int port)
Constructor for InetServerAddress.

Parameters:
addr - the InetAddress of the server to which this instance corresponds.
port - the port of the server to which this instance corresponds.
Method Detail

getInetAddress

public java.net.InetAddress getInetAddress()
Returns this instance's InetAddress.

Returns:
an InetAddess.

getPort

public int getPort()
Returns this instance's port.

Returns:
a port.

equals

public boolean equals(java.lang.Object other)
Description copied from interface: ServerAddress
Implementations should override this method in manner consistent with the method's specification (in the Object class).

Specified by:
equals in interface ServerAddress
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getTransportType

public java.lang.String getTransportType()
Description copied from interface: ServerAddress
Returns the "transport type" of the server corresponding to this server address. A transport type is an arbitrary, logical identifier.

Specified by:
getTransportType in interface ServerAddress
Returns:
a transport type, as a String.
See Also:
ServerAddress.getTransportType()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

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


Copyright © 2010 Sapia OSS. All Rights Reserved.