Class AccessControlFilter<A extends ProtocolServerConfiguration>
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.infinispan.server.core.transport.AccessControlFilter<A>
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
@Sharable public class AccessControlFilter<A extends ProtocolServerConfiguration> extends io.netty.channel.ChannelInboundHandlerAdapter
This class provides the functionality to either accept or reject newChannel
s based on their IP address.- Since:
- 12.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccessControlFilter.AccessControlFilterEvent
-
Field Summary
Fields Modifier and Type Field Description static AccessControlFilter.AccessControlFilterEvent
EVENT
-
Constructor Summary
Constructors Constructor Description AccessControlFilter(A configuration)
AccessControlFilter(A configuration, boolean onRegistration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
accept(InetSocketAddress remoteAddress)
void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
void
channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
void
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
EVENT
public static final AccessControlFilter.AccessControlFilterEvent EVENT
-
-
Method Detail
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
- Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
accept
protected boolean accept(InetSocketAddress remoteAddress) throws Exception
- Throws:
Exception
-
channelRegistered
public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx) throws Exception
- Specified by:
channelRegistered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRegistered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
-