Class HeaderPatternRule
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.PatternRule
org.eclipse.jetty.rewrite.handler.HeaderPatternRule
Puts or adds a response header whenever the rule matches a path Servlet pattern.
- 
Nested Class Summary
Nested classes/interfaces inherited from class Rule
Rule.Handler, Rule.HttpURIHandler - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionapply(Rule.Handler input) Invoked after the Servlet pattern matched the URI path to apply the rule's logic.booleanisAdd()voidsetAdd(boolean add) Usetrueto add the response header,falseto put the response header.voidsetHeaderName(String name) voidsetHeaderValue(String value) toString()Methods inherited from class PatternRule
getPattern, matchAndApply, setPatternMethods inherited from class Rule
isTerminating, setTerminating 
- 
Constructor Details
- 
HeaderPatternRule
public HeaderPatternRule() - 
HeaderPatternRule
 
 - 
 - 
Method Details
- 
getHeaderName
 - 
setHeaderName
 - 
getHeaderValue
 - 
setHeaderValue
 - 
isAdd
public boolean isAdd() - 
setAdd
public void setAdd(boolean add) Usetrueto add the response header,falseto put the response header.- Parameters:
 add-trueto add the response header,falseto put the response header.
 - 
apply
Description copied from class:PatternRuleInvoked after the Servlet pattern matched the URI path to apply the rule's logic.
- Specified by:
 applyin classPatternRule- Parameters:
 input- the inputRequestandHandler- Returns:
 - the possibly wrapped 
RequestandHandler - Throws:
 IOException- if applying the rule failed
 - 
toString
- Overrides:
 toStringin classPatternRule
 
 -