public final class Endpoint extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Endpoint.Builder |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
ipv4()
The text representation of the primary IPv4 address associated with this a connection.
|
byte[] |
ipv4Bytes()
IPv4 endpoint address packed into 4 bytes or null if unknown.
|
String |
ipv6()
The text representation of the primary IPv6 address associated with this a connection.
|
byte[] |
ipv6Bytes()
IPv6 endpoint address packed into 16 bytes or null if unknown.
|
static Endpoint.Builder |
newBuilder() |
Integer |
port()
Port of the IP's socket or null, if not known.
|
int |
portAsInt()
Like
port() except returns a primitive where zero implies absent. |
String |
serviceName()
Lower-case label of this node in the service graph, such as "favstar".
|
Endpoint.Builder |
toBuilder() |
String |
toString() |
@Nullable public String serviceName()
This is a primary label for trace lookup and aggregation, so it should be intuitive and consistent. Many use a name from service discovery.
@Nullable public String ipv4()
@Nullable public byte[] ipv4Bytes()
ipv6()
,
Inet4Address.getAddress()
@Nullable public String ipv6()
for mapped addresses
,
ipv6Bytes()
@Nullable public byte[] ipv6Bytes()
ipv6()
,
Inet6Address.getAddress()
@Nullable public Integer port()
InetSocketAddress.getPort()
public int portAsInt()
port()
except returns a primitive where zero implies absent.
Using this method will avoid allocation, so is encouraged when copying data.
public Endpoint.Builder toBuilder()
public static Endpoint.Builder newBuilder()
Copyright © 2015–2018 OpenZipkin. All rights reserved.