- All Superinterfaces:
Rule
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An action is a rule that has side-effects. It has access to the
HttpServletResponse and FilterChain of the request.
It is possible for actions to have nested rules (including both matchers and/or actions). This might be most appropriate when an action wraps the request or response objects before performing additional rules, such as a "noSession" implementation might do.
TODO: actions should be in own submodule?
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionperform(FirewallContext context, HttpServletRequest request, HttpServletResponse response, FilterChain chain) Performs the desired action.
-
Method Details
-
perform
Action.Result perform(FirewallContext context, HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException Performs the desired action. This may have side-effects on the context, request, or response.- Parameters:
request- The request being matchedresponse- The current responsechain- The current filter chain- Returns:
- Returns
Action.Result.TERMINATEfor a terminating action that has handled the request/response orAction.Result.CONTINUEfor a non-terminating action.Matcher.Result.MATCHandMatcher.Result.NO_MATCHare not valid returns from an action. - Throws:
IOExceptionServletException
-
