java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
- Direct Known Subclasses:
CompactPathRule,ForceRequestHeaderValueRule,HeaderRule,InvalidURIRule,PatternRule,RegexRule,RuleContainer
An abstract rule that, upon matching a certain condition, may wrap
the Request or the Handler to execute custom logic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract Rule.HandlermatchAndApply(Rule.Handler input) Tests whether the givenRequestshould apply, and if so the rule logic is triggered.voidsetTerminating(boolean value) toString()Returns the handling and terminating flag values.
-
Constructor Details
-
Rule
public Rule()
-
-
Method Details
-
matchAndApply
Tests whether the given
Requestshould apply, and if so the rule logic is triggered.- Parameters:
input- the inputRequestandHandler- Returns:
- the possibly wrapped
RequestandHandler, ornullif the rule did not match - Throws:
IOException- if applying the rule failed
-
isTerminating
public boolean isTerminating()- Returns:
- when
true, rules after this one are not invoked
-
setTerminating
public void setTerminating(boolean value) -
toString
Returns the handling and terminating flag values.
-