public final class Endpoint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Endpoint |
DEFAULT
The default Endpoint for the binApi client.
|
Constructor and Description |
---|
Endpoint(java.lang.String host,
int port)
Creates the Endpoint instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
java.lang.String |
host()
Returns the host URL which cannot be null.
|
int |
port()
Returns the port which can range between 0 and 65535
|
java.net.SocketAddress |
socketAddress()
Returns the SocketAddress for this post and port
|
java.lang.String |
toString()
|
public Endpoint(java.lang.String host, int port)
host
- The host URLport
- The port on which we will connectjava.lang.IllegalArgumentException
- on a null host parameter and on a port less than 0 or greater than 65535public java.lang.String host()
public int port()
public java.net.SocketAddress socketAddress()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object