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 Endpointbuild()Endpoint.Builderip(String ipString)Chaining variant ofparseIp(String)Endpoint.Builderip(InetAddress addr)Chaining variant ofparseIp(InetAddress)booleanparseIp(byte[] ipBytes)LikeparseIp(String)except this accepts a byte array.booleanparseIp(String ipString)Returns true ifEndpoint.ipv4()orEndpoint.ipv6()could be parsed from the input.booleanparseIp(InetAddress addr)Returns true ifEndpoint.ipv4()orEndpoint.ipv6()could be parsed from the input.Endpoint.Builderport(int port)Endpoint.Builderport(Integer port)Use this to set the port to an externally defined value.Endpoint.BuilderserviceName(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
-