Class TerminatingRegexRule


public class TerminatingRegexRule extends RegexRule
If this rule matches, terminate the processing of other rules. Allowing the request to be processed by the handlers after the rewrite rules.
  • Constructor Details

    • TerminatingRegexRule

      public TerminatingRegexRule()
    • TerminatingRegexRule

      public TerminatingRegexRule(@Name("regex") String regex)
  • Method Details

    • isTerminating

      public boolean isTerminating()
      Overrides:
      isTerminating in class Rule
      Returns:
      whether rules after this one are not invoked
    • apply

      public Rule.Handler apply(Rule.Handler input, Matcher matcher) throws IOException
      Description copied from class: RegexRule

      Invoked after the regular expression matched the URI path to apply the rule's logic.

      Specified by:
      apply in class RegexRule
      Parameters:
      input - the input Request and Handler
      matcher - the Matcher that matched the request path, with capture groups available for replacement.
      Returns:
      the possibly wrapped Request and Handler
      Throws:
      IOException - if applying the rule failed