java.io.Serializable@Generated("thrift")
public class Endpoint
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Endpoint.Builder |
| Modifier and Type | Field | Description |
|---|---|---|
int |
ipv4 |
IPv4 host address packed into 4 bytes or zero if unknown.
|
byte[] |
ipv6 |
IPv6 host address packed into 16 bytes or null if unknown.
|
java.lang.Short |
port |
Port of the IP's socket or null, if not known.
|
java.lang.String |
service_name |
Service name in lowercase, such as "memcache" or "zipkin-web"
Conventionally, when the service name isn't known, service_name = "unknown".
|
| Modifier and Type | Method | Description |
|---|---|---|
static Endpoint.Builder |
builder() |
|
static Endpoint |
create(java.lang.String serviceName,
int ipv4) |
|
static Endpoint |
create(java.lang.String serviceName,
int ipv4,
int port) |
Deprecated.
as leads to null pointer exceptions on port. Use
builder() instead. |
boolean |
equals(java.lang.Object o) |
|
int |
hashCode() |
|
Endpoint.Builder |
toBuilder() |
|
java.lang.String |
toString() |
Returns a json representation of this endpoint
|
public final int ipv4
Ex for the IP 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
Inet4Address.getAddress()@Nullable public final byte[] ipv6
Inet6Address.getAddress()@Nullable public final java.lang.Short port
Note: this is to be treated as an unsigned integer, so watch for negatives.
InetSocketAddress.getPort()public final java.lang.String service_name
@Deprecated public static Endpoint create(java.lang.String serviceName, int ipv4, int port)
builder() instead.public static Endpoint create(java.lang.String serviceName, int ipv4)
public Endpoint.Builder toBuilder()
public static Endpoint.Builder builder()
public 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.ObjectCopyright © 2018 OpenZipkin. All rights reserved.