Package sk.antons.web.filter.limiter
Class PathConf<T>
- java.lang.Object
-
- sk.antons.web.filter.limiter.PathConf<T>
-
public class PathConf<T> extends Object
Helper class for configuring path matchers in limiter.- Author:
- antons
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPathConf.Combostatic classPathConf.ComboConf
-
Field Summary
Fields Modifier and Type Field Description protected List<PathConf.Combo>excludesprotected List<PathConf.Combo>includes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tand()Back to limiter instance.PathConf<T>exclude(String pattern)Add exclude path matcherPathConf<T>exclude(String pattern, String method)Add exclude path matcherPathConf<T>exclude(String pattern, String method, String ip, String host, String contenttype, ResponseStatusCheck responseStatusCheck)Add exclude path matcherPathConf<T>include(String pattern)Add include path matcherPathConf<T>include(String pattern, String method)Add include path matcherPathConf<T>include(String pattern, String method, String ip, String host, String contenttype, ResponseStatusCheck responseStatusCheck)Add include path matcherPathConf<T>reset(int max)Clears all setting for path configuration.
-
-
-
Field Detail
-
includes
protected List<PathConf.Combo> includes
-
excludes
protected List<PathConf.Combo> excludes
-
-
Constructor Detail
-
PathConf
protected PathConf(T parent)
-
-
Method Detail
-
and
public T and()
Back to limiter instance.- Returns:
-
reset
public PathConf<T> 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<T> include(String pattern)
Add include path matcher- Parameters:
pattern- pattern for path matcher (mandatory)- Returns:
- this path configuration instance
-
include
public PathConf<T> 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<T> 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 nullip- ip address applied together with matcher if is is not nullhost- host name applied together with matcher if is is not nullcontenttype- content type applied together with matcher if is is not nullresponseStatusCheck- method applied together with matcher if is is not null- Returns:
- this path configuration instance
-
exclude
public PathConf<T> exclude(String pattern)
Add exclude path matcher- Parameters:
pattern- pattern for path matcher (mandatory)- Returns:
- this path configuration instance
-
exclude
public PathConf<T> 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<T> 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 nullip- ip address applied together with matcher if is is not nullhost- host name applied together with matcher if is is not nullcontenttype- content type applied together with matcher if is is not nullresponseStatusCheck- method applied together with matcher if is is not null- Returns:
- this path configuration instance
-
-