Class RemoteCIDRValve

    • Constructor Detail

      • RemoteCIDRValve

        public RemoteCIDRValve()
    • Method Detail

      • getAllow

        public java.lang.String getAllow()
        Return a string representation of the NetMask list in #allow.
        Overrides:
        getAllow in class RequestFilterValve
        Returns:
        the #allow list as a string, without the leading '[' and trailing ']'
      • setAllow

        public void setAllow​(java.lang.String input)
        Fill the #allow list with the list of netmasks provided as an argument, if any. Calls #fillFromInput.
        Overrides:
        setAllow in class RequestFilterValve
        Parameters:
        input - The list of netmasks, as a comma separated string
        Throws:
        java.lang.IllegalArgumentException - One or more netmasks are invalid
      • getDeny

        public java.lang.String getDeny()
        Return a string representation of the NetMask list in #deny.
        Overrides:
        getDeny in class RequestFilterValve
        Returns:
        the #deny list as a string, without the leading '[' and trailing ']'
      • setDeny

        public void setDeny​(java.lang.String input)
        Fill the #deny list with the list of netmasks provided as an argument, if any. Calls #fillFromInput.
        Overrides:
        setDeny in class RequestFilterValve
        Parameters:
        input - The list of netmasks, as a comma separated string
        Throws:
        java.lang.IllegalArgumentException - One or more netmasks are invalid
      • invoke

        public void invoke​(Request request,
                           Response response)
                    throws java.io.IOException,
                           ServletException
        Description copied from class: RequestFilterValve
        Extract the desired request property, and pass it (along with the specified request and response objects) to the protected process() method to perform the actual filtering. This method must be implemented by a concrete subclass.
        Specified by:
        invoke in interface Valve
        Specified by:
        invoke in class RequestFilterValve
        Parameters:
        request - The servlet request to be processed
        response - The servlet response to be created
        Throws:
        java.io.IOException - if an input/output error occurs
        ServletException - if a servlet error occurs
      • isAllowed

        public boolean isAllowed​(java.lang.String property)
        Description copied from class: RequestFilterValve
        Perform the test implemented by this Valve, matching against the specified request property value. This method is public so that it can be called through JMX, e.g. to test whether certain IP address is allowed or denied by the valve configuration.
        Overrides:
        isAllowed in class RequestFilterValve
        Parameters:
        property - The request property value on which to filter
        Returns:
        true if the request is allowed