Writeable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static java.net.InetAddress |
META_ADDRESS |
A non-routeable v4 meta transport address that can be used for
testing or in scenarios where targets should be marked as non-applicable from a transport perspective.
|
| Constructor | Description |
|---|---|
TransportAddress(java.net.InetAddress address,
int port) |
|
TransportAddress(java.net.InetSocketAddress address) |
|
TransportAddress(StreamInput in) |
Read from a stream.
|
TransportAddress(StreamInput in,
java.lang.String hostString) |
Read from a stream and use the
hostString when creating the InetAddress if the input comes from a version on or prior
Version.V_5_0_2 as the hostString was not serialized |
| Modifier and Type | Method | Description |
|---|---|---|
java.net.InetSocketAddress |
address() |
Returns the enclosed
InetSocketAddress |
boolean |
equals(java.lang.Object o) |
|
java.lang.String |
getAddress() |
Returns a string representation of the enclosed
InetSocketAddress |
int |
getPort() |
Returns the addresses port
|
int |
hashCode() |
|
java.lang.String |
toString() |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
public static final java.net.InetAddress META_ADDRESS
public TransportAddress(java.net.InetAddress address,
int port)
public TransportAddress(java.net.InetSocketAddress address)
public TransportAddress(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic TransportAddress(StreamInput in, @Nullable java.lang.String hostString) throws java.io.IOException
hostString when creating the InetAddress if the input comes from a version on or prior
Version.V_5_0_2 as the hostString was not serializedjava.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String getAddress()
InetSocketAddressNetworkAddress.format(InetAddress)public int getPort()
public java.net.InetSocketAddress address()
InetSocketAddresspublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object