Class RedirectPatternRule
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.PatternRule
org.eclipse.jetty.rewrite.handler.RedirectPatternRule
Issues a (3xx) redirect response whenever the rule finds a request path Servlet pattern match.
All redirects are part of the 3xx Redirection status code set.
Defaults to 302 Found.
- 
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.intbooleanvoidsetLocation(String value) Set the location to redirect.voidsetStatusCode(int statusCode) Set the 3xx redirect status code.toString()Methods inherited from class PatternRule
getPattern, matchAndApply, setPatternMethods inherited from class Rule
setTerminating 
- 
Constructor Details
- 
RedirectPatternRule
public RedirectPatternRule() - 
RedirectPatternRule
 
 - 
 - 
Method Details
- 
isTerminating
public boolean isTerminating()- Overrides:
 isTerminatingin classRule- Returns:
 - whether rules after this one are not invoked
 
 - 
getLocation
 - 
setLocation
Set the location to redirect.- Parameters:
 value- the location to redirect.
 - 
getStatusCode
public int getStatusCode() - 
setStatusCode
public void setStatusCode(int statusCode) Set the 3xx redirect status code.- Parameters:
 statusCode- the 3xx redirect status code
 - 
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
 
 -