Interface Filter

    • Method Detail

      • onAdded

        void onAdded​(FilterChain filterChain)
        Method is called, when the Filter has been added to the passed FilterChain.
        Parameters:
        filterChain - the FilterChain this Filter was added to.
      • onRemoved

        void onRemoved​(FilterChain filterChain)
        Method is called, when the Filter has been removed from the passed FilterChain.
        Parameters:
        filterChain - the FilterChain this Filter was removed from.
      • onFilterChainChanged

        void onFilterChainChanged​(FilterChain filterChain)
        Method is called, when the FilterChain this Filter is part of, has been changed.
        Parameters:
        filterChain - the FilterChain.
      • handleRead

        NextAction handleRead​(FilterChainContext ctx)
                       throws java.io.IOException
        Execute a unit of processing work to be performed, when channel will become available for reading. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.
        Parameters:
        ctx - FilterChainContext
        Returns:
        NextAction instruction for FilterChain, how it should continue the execution
        Throws:
        java.io.IOException
      • handleWrite

        NextAction handleWrite​(FilterChainContext ctx)
                        throws java.io.IOException
        Execute a unit of processing work to be performed, when some data should be written on channel. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.
        Parameters:
        ctx - FilterChainContext
        Returns:
        NextAction instruction for FilterChain, how it should continue the execution
        Throws:
        java.io.IOException
      • handleConnect

        NextAction handleConnect​(FilterChainContext ctx)
                          throws java.io.IOException
        Execute a unit of processing work to be performed, when channel gets connected. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.
        Parameters:
        ctx - FilterChainContext
        Returns:
        NextAction instruction for FilterChain, how it should continue the execution
        Throws:
        java.io.IOException
      • handleAccept

        NextAction handleAccept​(FilterChainContext ctx)
                         throws java.io.IOException
        Execute a unit of processing work to be performed, when server channel has accepted the client connection. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.
        Parameters:
        ctx - FilterChainContext
        Returns:
        NextAction instruction for FilterChain, how it should continue the execution
        Throws:
        java.io.IOException
      • handleClose

        NextAction handleClose​(FilterChainContext ctx)
                        throws java.io.IOException
        Execute a unit of processing work to be performed, when connection has been closed. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.
        Parameters:
        ctx - FilterChainContext
        Returns:
        NextAction instruction for FilterChain, how it should continue the execution
        Throws:
        java.io.IOException
      • exceptionOccurred

        void exceptionOccurred​(FilterChainContext ctx,
                               java.lang.Throwable error)
        Notification about exception, occurred on the FilterChain
        Parameters:
        ctx - event processing FilterChainContext
        error - error, which occurred during FilterChain execution