java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.HeaderRule
- Direct Known Subclasses:
ForwardedSchemeHeaderRule
Abstract rule that matches against request headers.
-
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 TypeMethodDescriptionprotected abstract Rule.Handlerapply(Rule.Handler input, String value) Invoked after the header matched theRequestheaders to apply the rule's logic.matchAndApply(Rule.Handler input) Tests whether the givenRequestshould apply, and if so the rule logic is triggered.voidsetHeaderName(String header) voidsetHeaderValue(String headerValue) toString()Returns the handling and terminating flag values.Methods inherited from class org.eclipse.jetty.rewrite.handler.Rule
isTerminating, setTerminating
-
Constructor Details
-
HeaderRule
public HeaderRule()
-
-
Method Details
-
getHeaderName
-
setHeaderName
-
getHeaderValue
-
setHeaderValue
- Parameters:
headerValue- the header value to match against. Ifnull, then the presence of the header is enough to match
-
matchAndApply
Description copied from class:RuleTests whether the given
Requestshould apply, and if so the rule logic is triggered.- Specified by:
matchAndApplyin classRule- Parameters:
input- the inputRequestandHandler- Returns:
- the possibly wrapped
RequestandHandler, ornullif the rule did not match - Throws:
IOException- if applying the rule failed
-
apply
Invoked after the header matched the
Requestheaders to apply the rule's logic.- Parameters:
input- the inputRequestandHandlervalue- the header value- Returns:
- the possibly wrapped
RequestandHandler - Throws:
IOException- if applying the rule failed
-
toString
Description copied from class:RuleReturns the handling and terminating flag values.
-