Search in sources :

Example 6 with ByteToMessageDecoder

use of io.netty.handler.codec.ByteToMessageDecoder in project LogHub by fbacchella.

the class GenericTcp method addHandlers.

@Override
public void addHandlers(ChannelPipeline pipe) {
    ByteToMessageDecoder splitter = getSplitter();
    if (splitter != null) {
        pipe.addFirst("Splitter", getSplitter());
    }
    super.addHandlers(pipe);
}
Also used : ByteToMessageDecoder(io.netty.handler.codec.ByteToMessageDecoder)

Aggregations

ByteToMessageDecoder (io.netty.handler.codec.ByteToMessageDecoder)6 ByteBuf (io.netty.buffer.ByteBuf)5 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)4 List (java.util.List)4 Bootstrap (io.netty.bootstrap.Bootstrap)3 ServerBootstrap (io.netty.bootstrap.ServerBootstrap)3 Channel (io.netty.channel.Channel)3 NioServerSocketChannel (io.netty.channel.socket.nio.NioServerSocketChannel)3 ChannelFuture (io.netty.channel.ChannelFuture)2 ChannelInboundHandlerAdapter (io.netty.channel.ChannelInboundHandlerAdapter)2 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)2 SocketChannel (io.netty.channel.socket.SocketChannel)2 NioSocketChannel (io.netty.channel.socket.nio.NioSocketChannel)2 Strings (com.google.common.base.Strings)1 io.netty.channel (io.netty.channel)1 AdaptiveRecvByteBufAllocator (io.netty.channel.AdaptiveRecvByteBufAllocator)1 ChannelFutureListener (io.netty.channel.ChannelFutureListener)1 ChannelInitializer (io.netty.channel.ChannelInitializer)1 ChannelOutboundHandlerAdapter (io.netty.channel.ChannelOutboundHandlerAdapter)1 ChannelPromise (io.netty.channel.ChannelPromise)1