Search in sources :

Example 1 with EnvelopeMessageHandler

use of org.graylog2.inputs.transports.netty.EnvelopeMessageHandler in project graylog2-server by Graylog2.

the class UdpTransport method getChildChannelHandlers.

@Override
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChildChannelHandlers(final MessageInput input) {
    final LinkedHashMap<String, Callable<? extends ChannelHandler>> handlerList = new LinkedHashMap<>(getCustomChildChannelHandlers(input));
    final CodecAggregator aggregator = getAggregator();
    if (aggregator != null) {
        LOG.debug("Adding codec aggregator {} to channel pipeline", aggregator);
        handlerList.put("codec-aggregator", () -> new EnvelopeMessageAggregationHandler(aggregator, localRegistry));
    }
    handlerList.put("envelope-message-handler", () -> new EnvelopeMessageHandler(input));
    return handlerList;
}
Also used : EnvelopeMessageHandler(org.graylog2.inputs.transports.netty.EnvelopeMessageHandler) CodecAggregator(org.graylog2.plugin.inputs.codecs.CodecAggregator) ChannelHandler(io.netty.channel.ChannelHandler) EnvelopeMessageAggregationHandler(org.graylog2.inputs.transports.netty.EnvelopeMessageAggregationHandler) Callable(java.util.concurrent.Callable) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

ChannelHandler (io.netty.channel.ChannelHandler)1 LinkedHashMap (java.util.LinkedHashMap)1 Callable (java.util.concurrent.Callable)1 EnvelopeMessageAggregationHandler (org.graylog2.inputs.transports.netty.EnvelopeMessageAggregationHandler)1 EnvelopeMessageHandler (org.graylog2.inputs.transports.netty.EnvelopeMessageHandler)1 CodecAggregator (org.graylog2.plugin.inputs.codecs.CodecAggregator)1