Package org.jboss.netty.handler.connection

Examples of org.jboss.netty.handler.connection.ConnectionLimitUpstreamHandler


    private final ConnectionPerIpLimitUpstreamHandler connectionPerIpLimitHandler;
    private final HashedWheelTimer timer = new HashedWheelTimer();
    private ChannelGroupHandler groupHandler;
  private int timeout;
    public AbstractChannelPipelineFactory(int timeout, int maxConnections, int maxConnectsPerIp, ChannelGroup channels) {
        connectionLimitHandler = new ConnectionLimitUpstreamHandler(maxConnections);
        connectionPerIpLimitHandler = new ConnectionPerIpLimitUpstreamHandler(maxConnectsPerIp);
        groupHandler = new ChannelGroupHandler(channels);
        this.timeout = timeout;
    }
View Full Code Here


    private final ConnectionPerIpLimitUpstreamHandler connectionPerIpLimitHandler;
    private TimeoutHandler timeoutHandler;
    private ChannelGroupHandler groupHandler;
    public AbstractChannelPipelineFactory(int timeout, int maxConnections, int maxConnectsPerIp, ChannelGroup channels) {
        timeoutHandler = new TimeoutHandler(new HashedWheelTimer(), timeout, timeout, 0);
        connectionLimitHandler = new ConnectionLimitUpstreamHandler(maxConnections);
        connectionPerIpLimitHandler = new ConnectionPerIpLimitUpstreamHandler(maxConnectsPerIp);
        groupHandler = new ChannelGroupHandler(channels);
    }
View Full Code Here

           
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline pipeline = pipeline();
                pipeline.addLast("groupHandler", groupHandler);
                pipeline.addLast("timeoutHandler", new TimeoutHandler(timer, TIMEOUT));
                pipeline.addLast("connectionLimit", new ConnectionLimitUpstreamHandler(IMAPServer.this.connectionLimit));

                pipeline.addLast("connectionPerIpLimit", new ConnectionPerIpLimitUpstreamHandler(IMAPServer.this.connPerIP));

                if (isSSLSocket()) {
                    // We need to set clientMode to false.
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.connection.ConnectionLimitUpstreamHandler

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.