public final class InetSocketTransportAddress extends Object implements TransportAddress
InetSocketAddress).| Modifier and Type | Field and Description |
|---|---|
static InetSocketTransportAddress |
PROTO |
| Constructor and Description |
|---|
InetSocketTransportAddress(InetAddress address,
int port) |
InetSocketTransportAddress(InetSocketAddress address) |
InetSocketTransportAddress(StreamInput in) |
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
address() |
boolean |
equals(Object o) |
String |
getAddress()
Returns the address string for this transport address
|
String |
getHost()
Returns the host string for this transport address
|
int |
getPort()
Returns the port of this transport address if applicable
|
int |
hashCode() |
TransportAddress |
readFrom(StreamInput in)
Reads a copy of an object with the same type form the stream input
The caller object remains unchanged.
|
boolean |
sameHost(TransportAddress other) |
String |
toString() |
short |
uniqueAddressTypeId() |
void |
writeTo(StreamOutput out)
Writes the current object into the output stream out
|
public static final InetSocketTransportAddress PROTO
public InetSocketTransportAddress(StreamInput in) throws IOException
IOExceptionpublic InetSocketTransportAddress(InetAddress address, int port)
public InetSocketTransportAddress(InetSocketAddress address)
public short uniqueAddressTypeId()
uniqueAddressTypeId in interface TransportAddresspublic boolean sameHost(TransportAddress other)
sameHost in interface TransportAddresspublic String getHost()
TransportAddressgetHost in interface TransportAddresspublic String getAddress()
TransportAddressgetAddress in interface TransportAddresspublic int getPort()
TransportAddressgetPort in interface TransportAddresspublic InetSocketAddress address()
public TransportAddress readFrom(StreamInput in) throws IOException
StreamableReaderreadFrom in interface StreamableReader<TransportAddress>IOExceptionpublic void writeTo(StreamOutput out) throws IOException
WriteablewriteTo in interface Writeable<TransportAddress>IOExceptionpublic String toString()
toString in interface TransportAddresstoString in class ObjectCopyright © 2009–2017. All rights reserved.