fr.dyade.aaa.util
Class SocketAddress

java.lang.Object
  extended byfr.dyade.aaa.util.SocketAddress

public class SocketAddress
extends java.lang.Object

This class implements an IP Socket Address (IP address + port number)


Constructor Summary
SocketAddress(java.lang.String hostname, int port)
          Creates a socket address from a hostname and a port number.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this object against the specified object.
 java.net.InetAddress getAddress()
          Gets the InetAddress.
 java.lang.String getHostname()
          Gets the hostname.
 int getPort()
          Gets the port number.
 java.net.InetAddress resetAddr()
          Resolves the IP address for this hostname, don't use an eventually caching address.
 java.lang.String toString()
          Constructs a string representation of this InetSocketAddress.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SocketAddress

public SocketAddress(java.lang.String hostname,
                     int port)
Creates a socket address from a hostname and a port number.

Parameters:
hostname - the Host name
port - The port number
Method Detail

resetAddr

public java.net.InetAddress resetAddr()
Resolves the IP address for this hostname, don't use an eventually caching address.

Returns:
the resolved IP address.

getPort

public int getPort()
Gets the port number.

Returns:
the port number.

getHostname

public java.lang.String getHostname()
Gets the hostname.

Returns:
the hostname part of the address.

getAddress

public java.net.InetAddress getAddress()
Gets the InetAddress.

Returns:
the InetAdress or null if it is unresolved.

equals

public boolean equals(java.lang.Object obj)
Compares this object against the specified object.

Parameters:
obj - the object to compare against.
Returns:
true if the objects are the same; false otherwise.

toString

public java.lang.String toString()
Constructs a string representation of this InetSocketAddress.

Returns:
a string representation of this object.


Copyright ? 2004 Scalagent - All rights reserved