List of usage examples for io.netty.channel ChannelPipeline addLast
ChannelPipeline addLast(EventExecutorGroup group, ChannelHandler... handlers);
From source file:com.seagate.kinetic.simulator.io.provider.nio.udt.UdtChannelInitializer.java
License:Open Source License
@Override protected void initChannel(UdtChannel ch) throws Exception { ChannelPipeline p = ch.pipeline(); p.addLast("handler", new UdtMessageServiceHandler(lcservice)); logger.info("UDT nio channel initialized ..."); }
From source file:com.simian.game.server.core.ProtobufServerInitializer.java
License:Apache License
@Override public void initChannel(SocketChannel ch) throws Exception { ChannelPipeline p = ch.pipeline(); /*// w ww. java 2 s .co m * pipeline.addLast("codec-http", new HttpServerCodec()); * pipeline.addLast("aggregator", new HttpObjectAggregator(65536)); */ p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender()); p.addLast("protobufEncoder", new ProtobufEncoder()); //IPFilter ipFilter = new IPFilter(); p.addLast("IPFilter", ipFilter); p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder()); p.addLast("protobufDecoder", new ProtobufDecoder(MessageRequestProto.MessageRequest.getDefaultInstance())); ProtobufChannelHandler pf = new ProtobufChannelHandler(); p.addLast("handler", protobufChannelHandler); }