List of usage examples for io.netty.channel ChannelPipeline get
<T extends ChannelHandler> T get(Class<T> handlerType);
From source file:org.wso2.carbon.transport.http.netty.sender.channel.TargetChannel.java
License:Open Source License
public void setCorrelationIdForLogging() { ChannelPipeline pipeline = this.getChannel().pipeline(); SourceHandler srcHandler = this.getCorrelatedSource(); if (srcHandler != null && pipeline.get(Constants.HTTP_TRACE_LOG_HANDLER) != null) { HTTPTraceLoggingHandler loggingHandler = (HTTPTraceLoggingHandler) pipeline .get(Constants.HTTP_TRACE_LOG_HANDLER); loggingHandler//w w w.j ava 2 s. c om .setCorrelatedSourceId(srcHandler.getInboundChannelContext().channel().id().asShortText()); } }
From source file:reactor.ipc.netty.http.server.CompressionHandler.java
License:Open Source License
void addCompressionHandlerOnce(ChannelHandlerContext ctx, ChannelPipeline cp) { if (cp.get(FilteringHttpContentCompressor.class) == null) { ctx.pipeline().addBefore(NettyPipeline.CompressionHandler, NettyPipeline.HttpCompressor, new FilteringHttpContentCompressor()); }//from w w w. j av a 2 s .c o m }