Search in sources :

Example 1 with DefaultChannelPipeline

use of org.jboss.netty.channel.DefaultChannelPipeline in project opentsdb by OpenTSDB.

the class NettyMocks method createHttpPipeline.

/**
 * Returns a simple pipeline with an HttpRequestDecoder and an
 * HttpResponseEncoder. No mocking, returns an actual pipeline
 * @return The pipeline
 */
private DefaultChannelPipeline createHttpPipeline() {
    DefaultChannelPipeline pipeline = new DefaultChannelPipeline();
    pipeline.addLast("requestDecoder", new HttpRequestDecoder());
    pipeline.addLast("responseEncoder", new HttpResponseEncoder());
    return pipeline;
}
Also used : HttpResponseEncoder(org.jboss.netty.handler.codec.http.HttpResponseEncoder) DefaultChannelPipeline(org.jboss.netty.channel.DefaultChannelPipeline) HttpRequestDecoder(org.jboss.netty.handler.codec.http.HttpRequestDecoder)

Example 2 with DefaultChannelPipeline

use of org.jboss.netty.channel.DefaultChannelPipeline in project druid by druid-io.

the class HttpClientPipelineFactory method getPipeline.

@Override
public ChannelPipeline getPipeline() {
    ChannelPipeline pipeline = new DefaultChannelPipeline();
    pipeline.addLast("codec", new HttpClientCodec());
    pipeline.addLast("inflater", new HttpContentDecompressor());
    return pipeline;
}
Also used : DefaultChannelPipeline(org.jboss.netty.channel.DefaultChannelPipeline) HttpClientCodec(org.jboss.netty.handler.codec.http.HttpClientCodec) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) DefaultChannelPipeline(org.jboss.netty.channel.DefaultChannelPipeline) HttpContentDecompressor(org.jboss.netty.handler.codec.http.HttpContentDecompressor)

Aggregations

DefaultChannelPipeline (org.jboss.netty.channel.DefaultChannelPipeline)2 ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)1 HttpClientCodec (org.jboss.netty.handler.codec.http.HttpClientCodec)1 HttpContentDecompressor (org.jboss.netty.handler.codec.http.HttpContentDecompressor)1 HttpRequestDecoder (org.jboss.netty.handler.codec.http.HttpRequestDecoder)1 HttpResponseEncoder (org.jboss.netty.handler.codec.http.HttpResponseEncoder)1