| Modifier and Type | Method and Description |
|---|---|
Endpoint |
build() |
Endpoint.Builder |
ip(InetAddress addr)
Chaining variant of
parseIp(InetAddress) |
Endpoint.Builder |
ip(String ipString)
Chaining variant of
parseIp(String) |
boolean |
parseIp(byte[] ipBytes)
Like
parseIp(String) except this accepts a byte array. |
boolean |
parseIp(InetAddress addr)
Returns true if
Endpoint.ipv4() or Endpoint.ipv6() could be parsed from the
input. |
boolean |
parseIp(String ipString)
Returns true if
Endpoint.ipv4() or Endpoint.ipv6() could be parsed from the
input. |
Endpoint.Builder |
port(int port) |
Endpoint.Builder |
port(Integer port)
Use this to set the port to an externally defined value.
|
Endpoint.Builder |
serviceName(String serviceName) |
public Endpoint.Builder serviceName(@Nullable String serviceName)
Endpoint.serviceNamepublic Endpoint.Builder ip(@Nullable InetAddress addr)
parseIp(InetAddress)public final boolean parseIp(@Nullable
InetAddress addr)
Endpoint.ipv4() or Endpoint.ipv6() 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 final boolean parseIp(byte[] ipBytes)
parseIp(String) except this accepts a byte array.ipBytes - byte array whose ownership is exclusively transfered to this endpoint.public Endpoint.Builder ip(@Nullable String ipString)
parseIp(String)public final boolean parseIp(@Nullable
String ipString)
Endpoint.ipv4() or Endpoint.ipv6() 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 port(@Nullable Integer port)
port - port associated with the endpoint. zero coerces to null (unknown)Endpoint.port()public Endpoint.Builder port(int port)
Endpoint.portAsInt()public Endpoint build()
Copyright © 2015–2018 OpenZipkin. All rights reserved.