public class UdpTransport extends NettyTransport
| Modifier and Type | Class and Description |
|---|---|
static class |
UdpTransport.Config |
static interface |
UdpTransport.Factory |
CK_BIND_ADDRESS, CK_NUMBER_WORKER_THREADS, CK_PORT, CK_RECV_BUFFER_SIZE, eventLoopGroupFactory, localRegistry, socketAddress, throughputCounter, workerThreads| Constructor and Description |
|---|
UdpTransport(Configuration configuration,
EventLoopGroupFactory eventLoopGroupFactory,
NettyTransportConfiguration nettyTransportConfiguration,
ThroughputCounter throughputCounter,
LocalMetricRegistry localRegistry) |
| Modifier and Type | Method and Description |
|---|---|
protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> |
getChannelHandlers(MessageInput input)
Subclasses can override this to add additional
channel handlers to the
Netty ChannelPipeline to support additional features. |
protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> |
getChildChannelHandlers(MessageInput input)
Subclasses can override this to modify the
channel handlers for child channels. |
SocketAddress |
getLocalAddress()
Get the local socket address this transport is listening on after being launched.
|
void |
launch(MessageInput input) |
void |
stop() |
getAggregator, getChannelInitializer, getCustomChildChannelHandlers, getMetricSet, getRecvBufferSize, setMessageAggregatorpublic UdpTransport(Configuration configuration, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry)
protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> getChannelHandlers(MessageInput input)
NettyTransportchannel handlers to the
Netty ChannelPipeline to support additional features.
Some common use cases are to add connection counters or traffic shapers.getChannelHandlers in class NettyTransportinput - The MessageInput for which these channel handlers are being addedchannel handlers to add to the Netty channel pipelineprotected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> getChildChannelHandlers(MessageInput input)
NettyTransportchannel handlers for child channels.
The default handlers in this group are all channel handlers returned by NettyTransport.getCustomChildChannelHandlers(MessageInput),
the optional aggregation handler (e.g. for chunked GELF via UDP) and the RawMessageHandler (in that order).
Usually overriding this method should only be necessary if you have a codec that cannot create a
RawMessage for incoming messages at the end of the pipeline.
A valid use case would be to insert debug handlers in the middle of the list, though.getChildChannelHandlers in class NettyTransportinput - The MessageInput for which these child channel handlers are being addedchannel handlers to add to the Netty channel pipeline for child channelsNettyTransport.getCustomChildChannelHandlers(MessageInput)public void launch(MessageInput input) throws MisfireException
MisfireExceptionpublic void stop()
@Nullable public SocketAddress getLocalAddress()
NettyTransportgetLocalAddress in class NettyTransportnull if the transport hasn't been launched yet.Copyright © 2012–2021 Graylog, Inc.. All rights reserved.