public class NetworkDestination
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
hostname |
protected int |
port |
Constructor and Description |
---|
NetworkDestination(java.lang.String hostname,
int port) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static NetworkDestination |
fromSocketChannel(java.nio.channels.SocketChannel channel)
Retrieves host:port information from a SocketChannel and instantiates a
new NetworkDestination with the information.
|
java.lang.String |
getHostname() |
int |
getPort() |
int |
hashCode() |
java.lang.String |
toString() |
public NetworkDestination(java.lang.String hostname, int port)
public static NetworkDestination fromSocketChannel(java.nio.channels.SocketChannel channel)
public java.lang.String getHostname()
public int getPort()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object