Package org.graylog2.inputs.transports
Class UdpTransport
java.lang.Object
org.graylog2.plugin.inputs.transports.NettyTransport
org.graylog2.inputs.transports.UdpTransport
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
NetFlowUdpTransport
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
Fields inherited from class org.graylog2.plugin.inputs.transports.NettyTransport
CK_BIND_ADDRESS, CK_NUMBER_WORKER_THREADS, CK_PORT, CK_RECV_BUFFER_SIZE, eventLoopGroupFactory, localRegistry, socketAddress, throughputCounter, workerThreads -
Constructor Summary
ConstructorsConstructorDescriptionUdpTransport(Configuration configuration, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> getChannelHandlers(MessageInput input) Subclasses can override this to add additionalchannel handlersto the NettyChannelPipelineto support additional features.protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> Subclasses can override this to modify thechannel handlersfor child channels.Get the local socket address this transport is listening on after being launched.voidlaunch(MessageInput input) voidstop()Methods inherited from class org.graylog2.plugin.inputs.transports.NettyTransport
getAggregator, getChannelInitializer, getCustomChildChannelHandlers, getMetricSet, getRecvBufferSize, setMessageAggregator
-
Constructor Details
-
UdpTransport
public UdpTransport(Configuration configuration, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry)
-
-
Method Details
-
getChannelHandlers
protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> getChannelHandlers(MessageInput input) Description copied from class:NettyTransportSubclasses can override this to add additionalchannel handlersto the NettyChannelPipelineto support additional features. Some common use cases are to add connection counters or traffic shapers.- Overrides:
getChannelHandlersin classNettyTransport- Parameters:
input- TheMessageInputfor which these channel handlers are being added- Returns:
- list of initial
channel handlersto add to the Nettychannel pipeline
-
getChildChannelHandlers
protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> getChildChannelHandlers(MessageInput input) Description copied from class:NettyTransportSubclasses can override this to modify thechannel handlersfor child channels. The default handlers in this group are all channel handlers returned byNettyTransport.getCustomChildChannelHandlers(MessageInput), the optional aggregation handler (e.g. for chunked GELF via UDP) and theRawMessageHandler(in that order). Usually overriding this method should only be necessary if you have a codec that cannot create aRawMessagefor 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.- Specified by:
getChildChannelHandlersin classNettyTransport- Parameters:
input- TheMessageInputfor which these child channel handlers are being added- Returns:
- list of custom
channel handlersto add to the Nettychannel pipelinefor child channels - See Also:
-
launch
- Throws:
MisfireException
-
stop
public void stop() -
getLocalAddress
Description copied from class:NettyTransportGet the local socket address this transport is listening on after being launched.- Specified by:
getLocalAddressin classNettyTransport- Returns:
- the listening address of this transport or
nullif the transport hasn't been launched yet.
-