protected void bindChannel(ReactorChannelHandler<IN, OUT, ChannelStream<IN, OUT>> handler, SocketChannel nativeChannel) { NettyChannelStream<IN, OUT> netChannel = new NettyChannelStream<IN, OUT>( getDefaultEnvironment(), getDefaultCodec(), getDefaultPrefetchSize(), getDefaultDispatcher(), nativeChannel ); ChannelPipeline pipeline = nativeChannel.pipeline(); if (log.isDebugEnabled()) { pipeline.addLast(new LoggingHandler(NettyTcpClient.class)); } pipeline.addLast( new NettyChannelHandlerBridge<IN, OUT>(handler, netChannel) ); }
protected void bindChannel(ReactorChannelHandler<IN, OUT, ChannelStream<IN, OUT>> handler, SocketChannel nativeChannel) { NettyChannelStream<IN ,OUT> netChannel = new NettyChannelStream<IN, OUT>( getDefaultEnvironment(), getDefaultCodec(), getDefaultPrefetchSize(), getDefaultDispatcher(), nativeChannel ); ChannelPipeline pipeline = nativeChannel.pipeline(); if(log.isDebugEnabled()){ pipeline.addLast(new LoggingHandler(NettyTcpServer.class)); } pipeline.addLast( new NettyChannelHandlerBridge<IN, OUT>(handler, netChannel) ); }
protected void bindChannel(ReactorChannelHandler<IN, OUT, ChannelStream<IN, OUT>> handler, SocketChannel nativeChannel) { NettyChannelStream<IN, OUT> netChannel = new NettyChannelStream<IN, OUT>( getDefaultEnvironment(), getDefaultCodec(), getDefaultPrefetchSize(), getDefaultDispatcher(), nativeChannel ); ChannelPipeline pipeline = nativeChannel.pipeline(); if (log.isDebugEnabled()) { pipeline.addLast(new LoggingHandler(NettyHttpServer.class)); } pipeline .addLast(new HttpServerCodec()); if (hasWebsocketEndpoints()) { pipeline.addLast(new HttpObjectAggregator(65536)); } pipeline .addLast(new NettyHttpServerHandler<IN, OUT>(handler, netChannel)); } }
protected void bindChannel(ReactorChannelHandler<IN, OUT, ChannelStream<IN, OUT>> handler, Object nativeChannel) { SocketChannel ch = (SocketChannel) nativeChannel; NettyChannelStream<IN, OUT> netChannel = new NettyChannelStream<IN, OUT>( getDefaultEnvironment(), getDefaultCodec(),
protected void bindChannel(ReactorChannelHandler<IN, OUT, ChannelStream<IN,OUT>> handler, Object _ioChannel) { DatagramChannel ioChannel = (DatagramChannel) _ioChannel; NettyChannelStream<IN, OUT> netChannel = new NettyChannelStream<IN, OUT>( getDefaultEnvironment(), getDefaultCodec(),