@ChannelHandler.Sharable public class RuleBasedIpFilter extends AbstractRemoteAddressFilter<java.net.InetSocketAddress>
Channels based on the
IpFilterRules passed to its constructor. If no rules are provided, all connections
will be accepted.
If you would like to explicitly take action on rejected Channels, you should override
AbstractRemoteAddressFilter.channelRejected(ChannelHandlerContext, SocketAddress).ChannelHandler.Sharable| Constructor and Description |
|---|
RuleBasedIpFilter(IpFilterRule... rules) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(ChannelHandlerContext ctx,
java.net.InetSocketAddress remoteAddress)
This method is called immediately after a
Channel gets registered. |
channelAccepted, channelActive, channelRegistered, channelRejectedchannelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedpublic RuleBasedIpFilter(IpFilterRule... rules)
protected boolean accept(ChannelHandlerContext ctx, java.net.InetSocketAddress remoteAddress) throws java.lang.Exception
AbstractRemoteAddressFilterChannel gets registered.accept in class AbstractRemoteAddressFilter<java.net.InetSocketAddress>java.lang.ExceptionCopyright © 2008–2018 The Netty Project. All rights reserved.