java.lang.Object
org.elasticsearch.common.transport.TransportAddress
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
A transport address used for IP socket address (wraps
InetSocketAddress).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InetAddressA 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.Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTransportAddress(InetAddress address, int port) TransportAddress(InetSocketAddress address) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the enclosedInetSocketAddressbooleanReturns a string representation of the enclosedInetSocketAddressintgetPort()Returns the addresses portinthashCode()toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
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 Details
-
TransportAddress
-
TransportAddress
-
TransportAddress
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getAddress
Returns a string representation of the enclosedInetSocketAddress- See Also:
-
getPort
public int getPort()Returns the addresses port -
address
Returns the enclosedInetSocketAddress -
equals
-
hashCode
public int hashCode() -
toString
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-