org.jboss.netty.handler.connection
Class ConnectionPerIpLimitUpstreamHandler

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

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

ChannelUpstreamHandler which limit connections per IP 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
ConnectionPerIpLimitUpstreamHandler(int maxConnectionsPerIp)
           
 
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

ConnectionPerIpLimitUpstreamHandler

public ConnectionPerIpLimitUpstreamHandler(int maxConnectionsPerIp)
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.