java.lang.Object
com.aoapps.servlet.firewall.api.MatcherUtil
Utilities to help in
Matcher implementations.-
Method Summary
Modifier and TypeMethodDescriptionstatic Matcher.ResultcallRules(FirewallContext context, Iterable<? extends Rule> rules, Matcher.Result result) Shared implementation for when matchers match the request and are dispatching to all their nested rules.static Matcher.ResultdoMatches(boolean matches, FirewallContext context, Iterable<? extends Rule> rules) Shared implementation for when matchers match the request and are dispatching to all their nested rules.static Matcher.ResultdoMatches(boolean matches, FirewallContext context, Iterable<? extends Rule> rules, Iterable<? extends Rule> otherwise) Shared implementation for when matchers match the request and are dispatching to all their nested rules.
-
Method Details
-
callRules
public static Matcher.Result callRules(FirewallContext context, Iterable<? extends Rule> rules, Matcher.Result result) throws IOException, ServletException Shared implementation for when matchers match the request and are dispatching to all their nested rules. This is also used for "otherwise" when the matcher does not match.- Throws:
IOExceptionServletException
-
doMatches
public static Matcher.Result doMatches(boolean matches, FirewallContext context, Iterable<? extends Rule> rules) throws IOException, ServletException Shared implementation for when matchers match the request and are dispatching to all their nested rules.- Throws:
IOExceptionServletException
-
doMatches
public static Matcher.Result doMatches(boolean matches, FirewallContext context, Iterable<? extends Rule> rules, Iterable<? extends Rule> otherwise) throws IOException, ServletException Shared implementation for when matchers match the request and are dispatching to all their nested rules.- Throws:
IOExceptionServletException
-
