Search in sources :

Example 1 with SyslogTCPFramingRouterHandler

use of org.graylog2.inputs.syslog.tcp.SyslogTCPFramingRouterHandler in project graylog2-server by Graylog2.

the class SyslogTcpTransport method getFinalChannelHandlers.

@Override
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getFinalChannelHandlers(MessageInput input) {
    final LinkedHashMap<String, Callable<? extends ChannelHandler>> finalChannelHandlers = Maps.newLinkedHashMap();
    finalChannelHandlers.putAll(super.getFinalChannelHandlers(input));
    // Replace the "framer" channel handler inserted by the parent.
    finalChannelHandlers.put("framer", new Callable<ChannelHandler>() {

        @Override
        public ChannelHandler call() throws Exception {
            return new SyslogTCPFramingRouterHandler(maxFrameLength, delimiter);
        }
    });
    return finalChannelHandlers;
}
Also used : SyslogTCPFramingRouterHandler(org.graylog2.inputs.syslog.tcp.SyslogTCPFramingRouterHandler) ChannelHandler(org.jboss.netty.channel.ChannelHandler) Callable(java.util.concurrent.Callable)

Aggregations

Callable (java.util.concurrent.Callable)1 SyslogTCPFramingRouterHandler (org.graylog2.inputs.syslog.tcp.SyslogTCPFramingRouterHandler)1 ChannelHandler (org.jboss.netty.channel.ChannelHandler)1