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 org.eclipse.jetty.rewrite.handler.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) voidsetHeaderName(String name) voidsetHeaderValue(String value) toString()Returns the handling and terminating flag values.Methods inherited from class org.eclipse.jetty.rewrite.handler.PatternRule
getPattern, matchAndApply, setPatternMethods inherited from class org.eclipse.jetty.rewrite.handler.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) - Parameters:
add- true to add the response header, false to 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
Description copied from class:RuleReturns the handling and terminating flag values.- Overrides:
toStringin classPatternRule
-