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| Constructor and Description |
|---|
ConnectionLimitUpstreamHandler(int maxConnections) |
| Modifier and Type | Method and Description |
|---|---|
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) |
int |
getConnections() |
void |
setMaxConnections(int maxConnections) |
public ConnectionLimitUpstreamHandler(int maxConnections)
public int getConnections()
public void setMaxConnections(int maxConnections)
public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws Exception
channelOpen in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.