Class BindAddress

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

public class BindAddress extends 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.
Author:
kwc@willowgarage.com (Ken Conley)
  • Method Details

    • 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 String toString()
      Overrides:
      toString in class Object
    • toInetSocketAddress

      public InetSocketAddress toInetSocketAddress()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object