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 new Channels based on their IP address.
Since:
12.1
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AccessControlFilter(A configuration)
     
    AccessControlFilter(A configuration, boolean onRegistration)
     
  • Method Summary

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Field Details

  • Constructor Details

    • AccessControlFilter

      public AccessControlFilter(A configuration)
    • AccessControlFilter

      public AccessControlFilter(A configuration, boolean onRegistration)
  • Method Details

    • userEventTriggered

      public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
      Specified by:
      userEventTriggered in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      userEventTriggered in class io.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 interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRegistered in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelActive

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelActive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception