com.mortbay.Util
Class InetAddrPort

java.lang.Object
  |
  +--com.mortbay.Util.InetAddrPort

public class InetAddrPort
extends java.lang.Object

InetAddress and Port


Constructor Summary
InetAddrPort()
           
InetAddrPort(java.net.InetAddress addr, int port)
          Constructor.
InetAddrPort(int port)
          Constructor for a port on all local host address.
InetAddrPort(java.lang.String inetAddrPort)
          Constructor.
 
Method Summary
 java.net.InetAddress getInetAddress()
          Get the IP address
 int getPort()
          Get the port
 void setInetAddress(java.net.InetAddress addr)
          Set the IP address
 void setPort(int port)
          Set the port
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InetAddrPort

public InetAddrPort()

InetAddrPort

public InetAddrPort(int port)
Constructor for a port on all local host address.
Parameters:
port -  

InetAddrPort

public InetAddrPort(java.net.InetAddress addr,
                    int port)
Constructor.
Parameters:
addr -  
port -  

InetAddrPort

public InetAddrPort(java.lang.String inetAddrPort)
             throws java.net.UnknownHostException
Constructor.
Parameters:
inetAddrPort - String of the form "addr:port"
Method Detail

getInetAddress

public java.net.InetAddress getInetAddress()
Get the IP address
Returns:
The IP address

setInetAddress

public void setInetAddress(java.net.InetAddress addr)
Set the IP address
Parameters:
addr - The IP address

getPort

public int getPort()
Get the port
Returns:
The port number

setPort

public void setPort(int port)
Set the port
Parameters:
port - The port number

toString

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