org.ros.address
Class BindAddress

java.lang.Object
  extended by org.ros.address.BindAddress

public class BindAddress
extends java.lang.Object

A wrapper for InetSocketAddress that emphasizes the difference between an address that should be used for binding a server port and one that should be advertised to external entities.


Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
static BindAddress newPrivate()
           
static BindAddress newPrivate(int port)
           
static BindAddress newPublic()
           
static BindAddress newPublic(int port)
           
 java.net.InetSocketAddress toInetSocketAddress()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newPublic

public static BindAddress newPublic(int port)
Parameters:
port - the port to bind to
Returns:
a BindAddress instance with specified port that will bind to all network interfaces on the host

newPublic

public static BindAddress newPublic()

newPrivate

public static BindAddress newPrivate(int port)
Parameters:
port - the port to bind to
Returns:
a BindAddress instance with specified port that will bind to the loopback interface on the host

newPrivate

public static BindAddress newPrivate()

toString

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

toInetSocketAddress

public java.net.InetSocketAddress toInetSocketAddress()

hashCode

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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object