Package zipkin2
Class Endpoint.Builder
java.lang.Object
zipkin2.Endpoint.Builder
- Enclosing class:
- Endpoint
public static final class Endpoint.Builder extends Object
-
Method Summary
Modifier and Type Method Description Endpoint
build()
Endpoint.Builder
ip(String ipString)
Chaining variant ofparseIp(String)
Endpoint.Builder
ip(InetAddress addr)
Chaining variant ofparseIp(InetAddress)
boolean
parseIp(byte[] ipBytes)
LikeparseIp(String)
except this accepts a byte array.boolean
parseIp(String ipString)
Returns true ifEndpoint.ipv4()
orEndpoint.ipv6()
could be parsed from the input.boolean
parseIp(InetAddress addr)
Returns true ifEndpoint.ipv4()
orEndpoint.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)
-
Method Details
-
serviceName
- See Also:
Endpoint.serviceName
-
ip
Chaining variant ofparseIp(InetAddress)
-
parseIp
Returns true ifEndpoint.ipv4()
orEndpoint.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()); }
- See Also:
parseIp(String)
-
parseIp
public final boolean parseIp(byte[] ipBytes)LikeparseIp(String)
except this accepts a byte array.- Parameters:
ipBytes
- byte array whose ownership is exclusively transferred to this endpoint.
-
ip
Chaining variant ofparseIp(String)
-
parseIp
Returns true ifEndpoint.ipv4()
orEndpoint.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()); }
- See Also:
parseIp(InetAddress)
-
port
Use this to set the port to an externally defined value.- Parameters:
port
- port associated with the endpoint. zero coerces to null (unknown)- See Also:
Endpoint.port()
-
port
- See Also:
Endpoint.portAsInt()
-
build
-