Class PatternRule
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.PatternRule
- Direct Known Subclasses:
 CookiePatternRule, HeaderPatternRule, RedirectPatternRule, ResponsePatternRule, RewritePatternRule, TerminatingPatternRule
Abstract rule that uses the Servlet pattern syntax via
ServletPathSpec for path pattern matching.
- 
Nested Class Summary
Nested classes/interfaces inherited from class Rule
Rule.Handler, Rule.HttpURIHandler - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Rule.Handlerapply(Rule.Handler input) Invoked after the Servlet pattern matched the URI path to apply the rule's logic.matchAndApply(Rule.Handler input) Tests whether the given inputHandler(which wraps aRequest) matches the rule, and if so returns an outputHandlerthat applies the rule logic.voidsetPattern(String pattern) toString()Methods inherited from class Rule
isTerminating, setTerminating 
- 
Constructor Details
- 
PatternRule
protected PatternRule() - 
PatternRule
 
 - 
 - 
Method Details
- 
getPattern
 - 
setPattern
 - 
matchAndApply
Description copied from class:RuleTests whether the given input
Handler(which wraps aRequest) matches the rule, and if so returns an outputHandlerthat applies the rule logic.If the input does not match,
nullis returned.- Specified by:
 matchAndApplyin classRule- Parameters:
 input- the inputHandlerthat wraps theRequest- Returns:
 - an output 
Handlerthat wraps the inputHandler, ornullif the rule does not match - Throws:
 IOException- if applying the rule fails
 - 
apply
Invoked after the Servlet pattern matched the URI path to apply the rule's logic.
- Parameters:
 input- the inputRequestandHandler- Returns:
 - the possibly wrapped 
RequestandHandler - Throws:
 IOException- if applying the rule failed
 - 
toString
 
 -