Package org.graylog2.inputs.transports
Class AbstractHttpTransport
java.lang.Object
org.graylog2.plugin.inputs.transports.NettyTransport
org.graylog2.plugin.inputs.transports.AbstractTcpTransport
org.graylog2.inputs.transports.AbstractHttpTransport
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
HttpTransport,RawHttpTransport
-
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 static final intprotected final booleanprotected final booleanprotected final intFields inherited from class org.graylog2.plugin.inputs.transports.AbstractTcpTransport
childEventLoopGroup, configuration, parentEventLoopGroupFields 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
ConstructorsConstructorDescriptionAbstractHttpTransport(Configuration configuration, io.netty.channel.EventLoopGroup eventLoopGroup, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry, TLSProtocolsConfiguration tlsConfiguration, String path) -
Method Summary
Modifier and TypeMethodDescriptionprotected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> Subclasses can override this to modify thechannel handlersat the end of the pipeline for child channels.voidlaunch(MessageInput input, InputFailureRecorder inputFailureRecorder) protected static intparseMaxChunkSize(Configuration configuration) Methods inherited from class org.graylog2.plugin.inputs.transports.AbstractTcpTransport
getBootstrap, getChildChannelHandlers, getLocalAddress, launch, stopMethods inherited from class org.graylog2.plugin.inputs.transports.NettyTransport
getAggregator, getChannelHandlers, getChannelInitializer, getMetricSet, getRecvBufferSize, setMessageAggregator
-
Field Details
-
DEFAULT_MAX_CHUNK_SIZE
protected static final int DEFAULT_MAX_CHUNK_SIZE -
enableBulkReceiving
protected final boolean enableBulkReceiving -
enableCors
protected final boolean enableCors -
maxChunkSize
protected final int maxChunkSize
-
-
Constructor Details
-
AbstractHttpTransport
public AbstractHttpTransport(Configuration configuration, io.netty.channel.EventLoopGroup eventLoopGroup, EventLoopGroupFactory eventLoopGroupFactory, NettyTransportConfiguration nettyTransportConfiguration, ThroughputCounter throughputCounter, LocalMetricRegistry localRegistry, TLSProtocolsConfiguration tlsConfiguration, String path)
-
-
Method Details
-
parseMaxChunkSize
- Returns:
- If the configured Max Chunk Size is less than zero, return
DEFAULT_MAX_CHUNK_SIZE.
-
getCustomChildChannelHandlers
protected LinkedHashMap<String,Callable<? extends io.netty.channel.ChannelHandler>> getCustomChildChannelHandlers(MessageInput input) Description copied from class:NettyTransportSubclasses can override this to modify thechannel handlersat the end of the pipeline for child channels.- Overrides:
getCustomChildChannelHandlersin 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
-
launch
public void launch(MessageInput input, @Nullable InputFailureRecorder inputFailureRecorder) throws MisfireException - Throws:
MisfireException
-