public final class LocalTransportAddress extends java.lang.Object implements TransportAddress
Writeable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field and Description |
|---|---|
static short |
TYPE_ID |
| Constructor and Description |
|---|
LocalTransportAddress(StreamInput in)
Read from a stream.
|
LocalTransportAddress(StreamInput in,
java.lang.String hostString)
Same as
LocalTransportAddress(StreamInput) but accepts the second argument |
LocalTransportAddress(java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
static LocalTransportAddress |
buildUnique()
generates a new unique address
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAddress()
Returns the address string for this transport address
|
java.lang.String |
getHost()
Returns the host string for this transport address
|
int |
getPort()
Returns the port of this transport address if applicable
|
int |
hashCode() |
java.lang.String |
id() |
boolean |
isLoopbackOrLinkLocalAddress() |
boolean |
sameHost(TransportAddress other) |
java.lang.String |
toString() |
short |
uniqueAddressTypeId() |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
public static final short TYPE_ID
public LocalTransportAddress(java.lang.String id)
public LocalTransportAddress(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic LocalTransportAddress(StreamInput in, java.lang.String hostString) throws java.io.IOException
LocalTransportAddress(StreamInput) but accepts the second argumentjava.io.IOExceptionpublic static LocalTransportAddress buildUnique()
public void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String id()
public short uniqueAddressTypeId()
uniqueAddressTypeId in interface TransportAddresspublic boolean sameHost(TransportAddress other)
sameHost in interface TransportAddresspublic boolean isLoopbackOrLinkLocalAddress()
isLoopbackOrLinkLocalAddress in interface TransportAddresspublic java.lang.String getHost()
TransportAddressgetHost in interface TransportAddresspublic java.lang.String getAddress()
TransportAddressgetAddress in interface TransportAddresspublic int getPort()
TransportAddressgetPort in interface TransportAddresspublic 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 interface TransportAddresstoString in class java.lang.Object