fr.dyade.aaa.util
Class SocketAddress
java.lang.Object
fr.dyade.aaa.util.SocketAddress
public class SocketAddress
extends java.lang.Object
This class implements an IP Socket Address (IP address + port number)
SocketAddress(String hostname, int port) - Creates a socket address from a hostname and a port number.
|
boolean | equals(Object obj) - Compares this object against the specified object.
|
InetAddress | getAddress() - Gets the
InetAddress .
|
String | getHostname() - Gets the
hostname .
|
int | getPort() - Gets the port number.
|
InetAddress | resetAddr() - Resolves the IP address for this hostname, don't use an eventually
caching address.
|
String | toString() - Constructs a string representation of this InetSocketAddress.
|
SocketAddress
public SocketAddress(String hostname,
int port)
Creates a socket address from a hostname and a port number.
hostname
- the Host nameport
- The port number
equals
public boolean equals(Object obj)
Compares this object against the specified object.
obj
- the object to compare against.
true
if the objects are the same;
false
otherwise.
getAddress
public InetAddress getAddress()
Gets the InetAddress
.
- the InetAdress or
null
if it is unresolved.
getHostname
public String getHostname()
Gets the hostname
.
- the hostname part of the address.
getPort
public int getPort()
Gets the port number.
- the port number.
resetAddr
public InetAddress resetAddr()
Resolves the IP address for this hostname, don't use an eventually
caching address.
- the resolved IP address.
toString
public String toString()
Constructs a string representation of this InetSocketAddress.
- a string representation of this object.
Copyright B) 2004 Scalagent - All rights reserved