public class BindAddress
extends java.lang.Object
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.Modifier and Type | Method and Description |
---|---|
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() |
public static BindAddress newPublic(int port)
port
- the port to bind toBindAddress
instance with specified port that will bind
to all network interfaces on the hostpublic static BindAddress newPublic()
public static BindAddress newPrivate(int port)
port
- the port to bind toBindAddress
instance with specified port that will bind
to the loopback interface on the hostpublic static BindAddress newPrivate()
public java.lang.String toString()
toString
in class java.lang.Object
public java.net.InetSocketAddress toInetSocketAddress()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object