| Modifier and Type | Method and Description |
|---|---|
Endpoint |
build() |
Endpoint.Builder |
ipv4(int ipv4) |
Endpoint.Builder |
ipv6(byte[] ipv6)
When not null, this sets the
Endpoint.ipv6, unless the input is an IPv4-Compatible or IPv4-Mapped
Embedded IPv6 Address. |
boolean |
parseIp(InetAddress addr)
Returns true if
ipv4(int) or ipv6(byte[]) could be parsed from the input. |
boolean |
parseIp(String ipString)
Returns true if
ipv4(int) or ipv6(byte[]) could be parsed from the input. |
Endpoint.Builder |
port(int port)
Use this to set the port to an externally defined value.
|
Endpoint.Builder |
port(Short port) |
Endpoint.Builder |
serviceName(String serviceName) |
public Endpoint.Builder serviceName(String serviceName)
Endpoint.serviceNamepublic boolean parseIp(@Nullable
InetAddress addr)
ipv4(int) or ipv6(byte[]) could be parsed from the input.
Returns boolean not this for conditional parsing. For example:
if (!builder.parseIp(input.getHeader("X-Forwarded-For"))) {
builder.parseIp(input.getRemoteAddr());
}
parseIp(String)public boolean parseIp(@Nullable
String ipString)
ipv4(int) or ipv6(byte[]) could be parsed from the input.
Returns boolean not this for conditional parsing. For example:
if (!builder.parseIp(input.getHeader("X-Forwarded-For"))) {
builder.parseIp(input.getRemoteAddr());
}
parseIp(InetAddress)public Endpoint.Builder ipv4(int ipv4)
Endpoint.ipv4public Endpoint.Builder ipv6(@Nullable byte[] ipv6)
Endpoint.ipv6, unless the input is an IPv4-Compatible or IPv4-Mapped
Embedded IPv6 Address. In such case, ipv4(int) is called with the embedded
address.Endpoint.ipv6public Endpoint.Builder port(int port)
Don't pass Endpoint.port to this method, as it may result in a
NullPointerException. Instead, use Endpoint.toBuilder() or port(Short).
port - port associated with the endpoint. zero coerces to null (unknown)Endpoint.portpublic Endpoint.Builder port(@Nullable Short port)
Endpoint.portpublic Endpoint build()
Copyright © 2015–2018 OpenZipkin. All rights reserved.