Search in sources :

Example 1 with ChunkedWriteHandler

use of org.jboss.netty.handler.stream.ChunkedWriteHandler in project NabAlive by jcheype.

the class HttpApiServerPipelineFactory method getPipeline.

@Override
public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = pipeline();
    // Uncomment the following line if you want HTTPS
    //        SSLEngine engine = //SecureChatSslContextFactory.getServerContext().createSSLEngine();
    //        engine.setUseClientMode(false);
    //        pipeline.addLast("ssl", new SslHandler(engine));
    pipeline.addLast("timeout", new IdleStateHandler(timer, 0, 0, 20));
    pipeline.addLast("decoder", new HttpRequestDecoder());
    pipeline.addLast("encoder", new HttpResponseEncoder());
    //        pipeline.addLast("comressor", new HttpContentCompressor(9));
    pipeline.addLast("aggregator", new HttpChunkAggregator(65536));
    pipeline.addLast("chunkedWriter", new ChunkedWriteHandler());
    //pipeline.addLast("executor", eh);
    pipeline.addLast("handler", handler);
    return pipeline;
}
Also used : ChunkedWriteHandler(org.jboss.netty.handler.stream.ChunkedWriteHandler) IdleStateHandler(org.jboss.netty.handler.timeout.IdleStateHandler) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Aggregations

ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)1 ChunkedWriteHandler (org.jboss.netty.handler.stream.ChunkedWriteHandler)1 IdleStateHandler (org.jboss.netty.handler.timeout.IdleStateHandler)1