Class TransportAddress
org.elasticsearch.common.transport.TransportAddress
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
public final class TransportAddress
extends
implements Writeable, org.elasticsearch.common.xcontent.ToXContentFragment
A transport address used for IP socket address (wraps ).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic
A 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.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionaddress, int port)
address)
Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionaddress()
Returns the enclosedboolean
o)
Returns a string representation of the enclosedint
getPort()
Returns the addresses portint
hashCode()
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.
, , , , , , ,
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
META_ADDRESS
public static final META_ADDRESSA that can be used for testing or in scenarios where targets should be marked as non-applicable from a transport perspective.
-
-
Constructor Details
-
TransportAddress
public TransportAddress( address, int port) -
TransportAddress
public TransportAddress( address) -
TransportAddress
Read from a stream.- Throws:
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
getAddress
public getAddress()Returns a string representation of the enclosed- See Also:
NetworkAddress.format(InetAddress)
-
getPort
public int getPort()Returns the addresses port -
address
public address()Returns the enclosed -
equals
public boolean equals( o)- Overrides:
in class
-
hashCode
public int hashCode()- Overrides:
in class
-
toString
public toString()- Overrides:
in class
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
-