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-311Constructor and Description |
---|
ConnectionPerIpLimitUpstreamHandler(int maxConnectionsPerIp) |
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(String ip) |
void |
setMaxConnectionsPerIp(int maxConnectionsPerIp) |
public ConnectionPerIpLimitUpstreamHandler(int maxConnectionsPerIp)
public int getConnections(String ip)
public void setMaxConnectionsPerIp(int maxConnectionsPerIp)
public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e) throws Exception
channelOpen
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.