Class PathConf<T>


  • public class PathConf<T>
    extends Object
    Helper class for configuring path matchers in limiter.
    Author:
    antons
    • Constructor Detail

      • PathConf

        protected PathConf​(T parent)
    • Method Detail

      • and

        public T and()
        Back to limiter instance.
        Returns:
      • reset

        public PathConf reset​(int max)
        Clears all setting for path configuration.
        Parameters:
        max - maximal number of path element which may occure.
        Returns:
        this path configuration instance
      • include

        public PathConf include​(String pattern)
        Add include path matcher
        Parameters:
        pattern - pattern for path matcher (mandatory)
        Returns:
        this path configuration instance
      • include

        public PathConf include​(String pattern,
                                String method)
        Add include path matcher
        Parameters:
        pattern - pattern for path matcher (mandatory)
        method - method applied together with matcher if is is not null
        Returns:
        this path configuration instance
      • include

        public PathConf include​(String pattern,
                                String method,
                                String ip,
                                String host,
                                String contenttype,
                                ResponseStatusCheck responseStatusCheck)
        Add include path matcher
        Parameters:
        pattern - pattern for path matcher (mandatory)
        method - method applied together with matcher if is is not null
        ip - ip address applied together with matcher if is is not null
        host - host name applied together with matcher if is is not null
        contenttype - content type applied together with matcher if is is not null
        responseStatusCheck - method applied together with matcher if is is not null
        Returns:
        this path configuration instance
      • exclude

        public PathConf exclude​(String pattern)
        Add exclude path matcher
        Parameters:
        pattern - pattern for path matcher (mandatory)
        Returns:
        this path configuration instance
      • exclude

        public PathConf exclude​(String pattern,
                                String method)
        Add exclude path matcher
        Parameters:
        pattern - pattern for path matcher (mandatory)
        method - method applied together with matcher if is is not null
        Returns:
        this path configuration instance
      • exclude

        public PathConf exclude​(String pattern,
                                String method,
                                String ip,
                                String host,
                                String contenttype,
                                ResponseStatusCheck responseStatusCheck)
        Add exclude path matcher
        Parameters:
        pattern - pattern for path matcher (mandatory)
        method - method applied together with matcher if is is not null
        ip - ip address applied together with matcher if is is not null
        host - host name applied together with matcher if is is not null
        contenttype - content type applied together with matcher if is is not null
        responseStatusCheck - method applied together with matcher if is is not null
        Returns:
        this path configuration instance