Class AbstractTcpTransport
java.lang.Object
org.graylog2.plugin.inputs.transports.NettyTransport
org.graylog2.plugin.inputs.transports.AbstractTcpTransport
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
BeatsTransport,HttpTransport,TcpTransport
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.graylog2.plugin.inputs.transports.Transport
Transport.Factory<T extends Transport> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.netty.channel.EventLoopGroupprotected final Configurationprotected final io.netty.channel.EventLoopGroupFields 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
ConstructorsConstructorDescriptionAbstractTcpTransport(Configuration configuration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry, io.netty.channel.EventLoopGroup parentEventLoopGroup, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, Configuration graylogConfiguration) Deprecated.AbstractTcpTransport(Configuration configuration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry, io.netty.channel.EventLoopGroup parentEventLoopGroup, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, TLSProtocolsConfiguration tlsConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.netty.bootstrap.ServerBootstrapgetBootstrap(MessageInput input) 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, getChannelHandlers, getChannelInitializer, getCustomChildChannelHandlers, getMetricSet, getRecvBufferSize, setMessageAggregator
-
Field Details
-
configuration
-
parentEventLoopGroup
protected final io.netty.channel.EventLoopGroup parentEventLoopGroup -
childEventLoopGroup
protected io.netty.channel.EventLoopGroup childEventLoopGroup
-
-
Constructor Details
-
AbstractTcpTransport
@Deprecated public AbstractTcpTransport(Configuration configuration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry, io.netty.channel.EventLoopGroup parentEventLoopGroup, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, Configuration graylogConfiguration) Deprecated. -
AbstractTcpTransport
public AbstractTcpTransport(Configuration configuration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry, io.netty.channel.EventLoopGroup parentEventLoopGroup, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, TLSProtocolsConfiguration tlsConfiguration)
-
-
Method Details
-
getBootstrap
-
launch
- Throws:
MisfireException
-
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.
-
stop
public void stop() -
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:
-