Package org.jboss.netty.handler.timeout

Examples of org.jboss.netty.handler.timeout.IdleStateHandler$State


                            readTimeout = clientAuth.getNetReadTimeout();
                        }
                        if (clientAuth.getNetWriteTimeout() > 0) {
                            writeTimeout = clientAuth.getNetWriteTimeout();
                        }
                        IdleStateHandler idleStateHandler = new IdleStateHandler(NettyUtils.hashedWheelTimer,
                                                                                 readTimeout, writeTimeout, 0);
                        ctx.getPipeline().addBefore(SessionHandler.class.getName(), IdleStateHandler.class.getName(),
                                                    idleStateHandler);

                        IdleStateAwareChannelHandler idleStateAwareChannelHandler = new IdleStateAwareChannelHandler() {
View Full Code Here


                cp.addLast(ChannelStatistics.NAME, new ChannelStatistics(allChannels));
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
                    // Add handlers to detect idle client connections and disconnect them
                    cp.addLast("idleTimeoutHandler", new IdleStateHandler(timer,
                                                                          (int) def.getClientIdleTimeout().toMillis(),
                                                                          NO_WRITER_IDLE_TIMEOUT,
                                                                          NO_ALL_IDLE_TIMEOUT,
                                                                          TimeUnit.MILLISECONDS));
                    cp.addLast("idleDisconnectHandler", new IdleDisconnectHandler());
View Full Code Here

                cp.addLast(ChannelStatistics.NAME, new ChannelStatistics(allChannels));
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
                    // Add handlers to detect idle client connections and disconnect them
                    cp.addLast("idleTimeoutHandler", new IdleStateHandler(nettyServerConfig.getTimer(),
                                                                          Ints.checkedCast(def.getClientIdleTimeout().toMillis()),
                                                                          NO_WRITER_IDLE_TIMEOUT,
                                                                          NO_ALL_IDLE_TIMEOUT,
                                                                          TimeUnit.MILLISECONDS));
                    cp.addLast("idleDisconnectHandler", new IdleDisconnectHandler());
View Full Code Here

                    cp.addLast(ChannelStatistics.NAME, new ChannelStatistics(allChannels));
                    cp.addLast("frameDecoder", new ThriftFrameDecoder(def.getMaxFrameSize(),
                                                                      def.getInProtocolFactory()));
                    if (def.getClientIdleTimeout() != null) {
                        // Add handlers to detect idle client connections and disconnect them
                        cp.addLast("idleTimeoutHandler", new IdleStateHandler(timer,
                                                                              (int)def.getClientIdleTimeout().toMillis(),
                                                                              NO_WRITER_IDLE_TIMEOUT,
                                                                              NO_ALL_IDLE_TIMEOUT,
                                                                              TimeUnit.MILLISECONDS
                                                                              ));
View Full Code Here

                            readTimeout = clientAuth.getNetReadTimeout();
                        }
                        if (clientAuth.getNetWriteTimeout() > 0) {
                            writeTimeout = clientAuth.getNetWriteTimeout();
                        }
                        IdleStateHandler idleStateHandler = new IdleStateHandler(NettyUtils.hashedWheelTimer,
                            readTimeout,
                            writeTimeout,
                            0);
                        ctx.getPipeline().addBefore(SessionHandler.class.getName(),
                            IdleStateHandler.class.getName(),
View Full Code Here

   * @see org.jboss.netty.channel.ChannelPipelineFactory#getPipeline()
   */
  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline channelPipeline = Channels.pipeline();
    if (this.getIdleStateAwareChannelHandlerBean()!= null) {
      channelPipeline.addLast("idleStateCheck", new IdleStateHandler(timer, 0L, 0L, this.getChannelIdleTimeMillis(),TimeUnit.MILLISECONDS));
      channelPipeline.addLast("idleCheckHandler", (ChannelHandler)this.applicationContext.getBean(this.getIdleStateAwareChannelHandlerBean()));
    }
    for (String handlerKey : this.getChannelHandlerBeanNamesMap().keySet()) {
      channelPipeline.addLast(handlerKey, (ChannelHandler)this.applicationContext.getBean(this.getChannelHandlerBeanNamesMap().get(handlerKey)));
    }
View Full Code Here

                cp.addLast(ChannelStatistics.NAME, channelStatistics);
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
                    // Add handlers to detect idle client connections and disconnect them
                    cp.addLast("idleTimeoutHandler", new IdleStateHandler(nettyServerConfig.getTimer(),
                                                                          def.getClientIdleTimeout().toMillis(),
                                                                          NO_WRITER_IDLE_TIMEOUT,
                                                                          NO_ALL_IDLE_TIMEOUT,
                                                                          TimeUnit.MILLISECONDS));
                    cp.addLast("idleDisconnectHandler", new IdleDisconnectHandler());
View Full Code Here

            private final TimeUnit TIMEOUT_UNIT = TimeUnit.SECONDS;

            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline pipeline = pipeline();
                pipeline.addLast(GROUP_HANDLER, groupHandler);
                pipeline.addLast("idleHandler", new IdleStateHandler(timer, 0, 0, timeout, TIMEOUT_UNIT));
                pipeline.addLast(TIMEOUT_HANDLER, new ImapIdleStateHandler());
                pipeline.addLast(CONNECTION_LIMIT_HANDLER, new ConnectionLimitUpstreamHandler(IMAPServer.this.connectionLimit));

                pipeline.addLast(CONNECTION_LIMIT_PER_IP_HANDLER, new ConnectionPerIpLimitUpstreamHandler(IMAPServer.this.connPerIP));
View Full Code Here

    @Override
    public ChannelPipeline getPipeline() {
        ChannelPipeline pipeline = Channels.pipeline();
        if (resetDelay != null) {
            pipeline.addLast("idleHandler", new IdleStateHandler(GlobalTimer.getTimer(), resetDelay, 0, 0));
        }
        pipeline.addLast("openHandler", new OpenChannelHandler(server));
        if (loggerEnabled) {
            pipeline.addLast("logger", new StandardLoggingHandler());
        }
View Full Code Here

                cp.addLast("encryptionHandler", securityHandlers.getEncryptionHandler());
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
                    // Add handlers to detect idle client connections and disconnect them
                    cp.addLast("idleTimeoutHandler", new IdleStateHandler(nettyServerConfig.getTimer(),
                                                                          def.getClientIdleTimeout().toMillis(),
                                                                          NO_WRITER_IDLE_TIMEOUT,
                                                                          NO_ALL_IDLE_TIMEOUT,
                                                                          TimeUnit.MILLISECONDS));
                    cp.addLast("idleDisconnectHandler", new IdleDisconnectHandler());
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.timeout.IdleStateHandler$State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.