org.sapia.ubik.net.udp
Class UDPServerAddress

java.lang.Object
  extended by org.sapia.ubik.net.udp.UDPServerAddress
All Implemented Interfaces:
java.io.Serializable, ServerAddress

public class UDPServerAddress
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

Field Summary
static java.lang.String TRANSPORT_TYPE
           
 
Constructor Summary
UDPServerAddress(java.net.InetAddress addr, int port)
          Constructor for InetServerAddress.
UDPServerAddress(java.net.InetAddress addr, int port, java.lang.String transportType)
           
 
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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSPORT_TYPE

public static final java.lang.String TRANSPORT_TYPE
See Also:
Constant Field Values
Constructor Detail

UDPServerAddress

public UDPServerAddress(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.

UDPServerAddress

public UDPServerAddress(java.net.InetAddress addr,
                        int port,
                        java.lang.String transportType)
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()


Copyright © 2010 Sapia OSS. All Rights Reserved.