Class UdpReporter.Builder
- java.lang.Object
-
- io.servicetalk.opentracing.zipkin.publisher.reporter.UdpReporter.Builder
-
- Enclosing class:
- UdpReporter
public static final class UdpReporter.Builder extends java.lang.Object
A builder to create a newUdpReporter
.
-
-
Constructor Summary
Constructors Constructor Description Builder(java.net.SocketAddress collectorAddress)
Create a newUdpReporter.Builder
for a given collectorAddress.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UdpReporter
build()
Builds a newUdpReporter
instance with this builder's options.UdpReporter.Builder
codec(Codec codec)
Sets theCodec
to encode the Spans with.UdpReporter.Builder
enableWireLogging(java.lang.String loggerName)
Enables wire-logging for udp packets sent.UdpReporter.Builder
executor(Executor executor)
Sets anExecutor
to use when required.UdpReporter.Builder
ioExecutor(IoExecutor ioExecutor)
Sets anIoExecutor
to use for writing to the datagram channel.
-
-
-
Constructor Detail
-
Builder
public Builder(java.net.SocketAddress collectorAddress)
Create a newUdpReporter.Builder
for a given collectorAddress.- Parameters:
collectorAddress
- the collector SocketAddress
-
-
Method Detail
-
codec
public UdpReporter.Builder codec(Codec codec)
Sets theCodec
to encode the Spans with.- Parameters:
codec
- the codec to use for this span.- Returns:
this
-
ioExecutor
public UdpReporter.Builder ioExecutor(IoExecutor ioExecutor)
Sets anIoExecutor
to use for writing to the datagram channel.- Parameters:
ioExecutor
- IoExecutor to use to write with.- Returns:
this
-
executor
public UdpReporter.Builder executor(Executor executor)
Sets anExecutor
to use when required.- Parameters:
executor
-Executor
to use- Returns:
this
-
enableWireLogging
public UdpReporter.Builder enableWireLogging(java.lang.String loggerName)
Enables wire-logging for udp packets sent.All wire events will be logged at
TRACE
level.- Parameters:
loggerName
- The name of the logger to log wire events.- Returns:
this
-
build
public UdpReporter build()
Builds a newUdpReporter
instance with this builder's options.This method may block while the underlying UDP channel is being bound.
- Returns:
- a new
UdpReporter
-
-