Search in sources :

Example 1 with IdleEventProcessor

use of co.cask.cdap.gateway.router.handlers.IdleEventProcessor in project cdap by caskdata.

the class ClientChannelPipelineFactory method getPipeline.

@Override
public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("tracker", connectionTracker);
    pipeline.addLast("request-encoder", new HttpRequestEncoder());
    // outbound handler gets dynamically added here (after 'request-encoder')
    pipeline.addLast("response-decoder", new HttpResponseDecoder());
    // disable the read-specific and write-specific timeouts; we only utilize IdleState#ALL_IDLE
    pipeline.addLast("idle-event-generator", new IdleStateHandler(timer, 0, 0, connectionTimeout));
    pipeline.addLast("idle-event-processor", new IdleEventProcessor());
    return pipeline;
}
Also used : IdleEventProcessor(co.cask.cdap.gateway.router.handlers.IdleEventProcessor) IdleStateHandler(org.jboss.netty.handler.timeout.IdleStateHandler) HttpRequestEncoder(org.jboss.netty.handler.codec.http.HttpRequestEncoder) HttpResponseDecoder(org.jboss.netty.handler.codec.http.HttpResponseDecoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Aggregations

IdleEventProcessor (co.cask.cdap.gateway.router.handlers.IdleEventProcessor)1 ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)1 HttpRequestEncoder (org.jboss.netty.handler.codec.http.HttpRequestEncoder)1 HttpResponseDecoder (org.jboss.netty.handler.codec.http.HttpResponseDecoder)1 IdleStateHandler (org.jboss.netty.handler.timeout.IdleStateHandler)1