Class RewriteLanguageRule
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.RewriteLanguageRule
Rule that can rewrite a request based on the 
Accept-Language header.- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classNested classes/interfaces inherited from class Rule
Rule.Handler, Rule.HttpURIHandler - 
Constructor Summary
ConstructorsConstructorDescriptionRewriteLanguageRule(boolean prefix) RewriteLanguageRule(BiFunction<String, String, String> localizePath, BiFunction<Context, String, Resource> getResource) RewriteLanguageRule(BiFunction<String, String, String> localizePath, BiFunction<Context, String, Resource> getResource, List<String> wildCardLanguages) RewriteLanguageRule(List<String> wildCardLanguages)  - 
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcegetResource(Context context, String pathInContext) static StringlocalizeWithPrefix(String pathInContext, String language) static StringlocalizeWithSuffix(String pathInContext, String language) 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.protected Rule.HandlernewLanguageHandler(Rule.Handler input, String languagePathInContext, String language) toString()Methods inherited from class Rule
isTerminating, setTerminating 
- 
Constructor Details
- 
RewriteLanguageRule
public RewriteLanguageRule() - 
RewriteLanguageRule
 - 
RewriteLanguageRule
public RewriteLanguageRule(boolean prefix)  - 
RewriteLanguageRule
public RewriteLanguageRule(BiFunction<String, String, String> localizePath, BiFunction<Context, String, Resource> getResource)  - 
RewriteLanguageRule
public RewriteLanguageRule(BiFunction<String, String, String> localizePath, BiFunction<Context, String, Resource> getResource, List<String> wildCardLanguages)  
 - 
 - 
Method Details
- 
localizeWithSuffix
 - 
localizeWithPrefix
 - 
getResource
 - 
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
 - 
toString
 - 
getWildCardLanguages
 - 
newLanguageHandler
protected Rule.Handler newLanguageHandler(Rule.Handler input, String languagePathInContext, String language)  
 -