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,
String hostString) |
| 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() |
InetSocketTransportAddress |
readFrom(StreamInput in)
Reads a copy of an object with the same type form the stream input
The caller object remains unchanged.
|
InetSocketTransportAddress |
readFrom(StreamInput in,
String hostString) |
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, @Nullable String hostString) 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 InetSocketTransportAddress readFrom(StreamInput in) throws IOException
StreamableReaderreadFrom in interface StreamableReader<TransportAddress>IOExceptionpublic InetSocketTransportAddress readFrom(StreamInput in, String hostString) throws IOException
readFrom in interface TransportAddressIOExceptionpublic 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.