org.jboss.netty.handler.connection
Class ConnectionLimitUpstreamHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.jboss.netty.handler.connection.ConnectionLimitUpstreamHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class ConnectionLimitUpstreamHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

ChannelUpstreamHandler which limit the concurrent connection. This handler must be used as singleton when adding it to the ChannelPipeline to work correctly TODO: Remove when its committed to NETTY. https://jira.jboss.org/jira/browse/NETTY-311


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
ConnectionLimitUpstreamHandler(int maxConnections)
           
 
Method Summary
 void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelConnected, channelDisconnected, channelInterestChanged, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, messageReceived, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionLimitUpstreamHandler

public ConnectionLimitUpstreamHandler(int maxConnections)
Method Detail

channelOpen

public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
                        org.jboss.netty.channel.ChannelStateEvent e)
                 throws java.lang.Exception
Overrides:
channelOpen in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
java.lang.Exception

channelClosed

public void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
                          org.jboss.netty.channel.ChannelStateEvent e)
                   throws java.lang.Exception
Overrides:
channelClosed in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
java.lang.Exception


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.