Search in sources :

Example 1 with LenientDelimiterBasedFrameDecoder

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

the class TcpTransport method getCustomChildChannelHandlers.

@Override
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getCustomChildChannelHandlers(MessageInput input) {
    final LinkedHashMap<String, Callable<? extends ChannelHandler>> childChannelHandlers = new LinkedHashMap<>();
    childChannelHandlers.put("framer", () -> new LenientDelimiterBasedFrameDecoder(maxFrameLength, delimiter));
    childChannelHandlers.putAll(super.getCustomChildChannelHandlers(input));
    return childChannelHandlers;
}
Also used : LenientDelimiterBasedFrameDecoder(org.graylog2.inputs.transports.netty.LenientDelimiterBasedFrameDecoder) ChannelHandler(io.netty.channel.ChannelHandler) 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 LenientDelimiterBasedFrameDecoder (org.graylog2.inputs.transports.netty.LenientDelimiterBasedFrameDecoder)1