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.PathConfexclude(String pattern)Add exclude path matcherPathConfexclude(String pattern, String method)Add exclude path matcherPathConfexclude(String pattern, String method, String ip, String host, String contenttype, ResponseStatusCheck responseStatusCheck)Add exclude path matcherPathConfinclude(String pattern)Add include path matcherPathConfinclude(String pattern, String method)Add include path matcherPathConfinclude(String pattern, String method, String ip, String host, String contenttype, ResponseStatusCheck responseStatusCheck)Add include path matcherPathConfreset(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 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 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 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 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
-
-