Class RuleContainer
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.RuleContainer
- Direct Known Subclasses:
RewriteCustomizer, VirtualHostRuleContainer
-
Nested Class Summary
Nested classes/interfaces inherited from class Rule
Rule.Handler, Rule.HttpURIHandlerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer -
Field Summary
FieldsFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aRuleto the existing ones.voidclear()Removes all the rules.voiddump(Appendable out, String indent) getRules()iterator()matchAndApply(Rule.Handler input) Processes the rules.voidsetOriginalPathAttribute(String originalPathAttribute) Sets a request attribute name that will be used to store the request original path.voidSet the list ofRule..Methods inherited from class Rule
isTerminating, setTerminating, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump, dumpSelfMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
ORIGINAL_QUERYSTRING_ATTRIBUTE_SUFFIX
- See Also:
-
-
Constructor Details
-
RuleContainer
public RuleContainer()
-
-
Method Details
-
getRules
-
setRules
-
iterator
-
addRule
-
clear
public void clear()Removes all the rules.
-
getOriginalPathAttribute
- Returns:
- the request attribute name used to store the request original path
- See Also:
-
setOriginalPathAttribute
Sets a request attribute name that will be used to store the request original path.
A request attribute name that stores the request original query is derived from this attribute name by adding
ORIGINAL_QUERYSTRING_ATTRIBUTE_SUFFIX, as in:String originalQueryAttribute = ruleContainer.getOriginalPathAttribute() + ORIGINAL_QUERYSTRING_ATTRIBUTE_SUFFIX;
- Parameters:
originalPathAttribute- the request attribute name used to store the request original path
-
matchAndApply
Processes the rules.
- Specified by:
matchAndApplyin classRule- Parameters:
input- the inputRequestandHandler- Returns:
- a
RequestandHandler, possibly wrapped by rules to implement the rule's logic, ornullif no rule matched - Throws:
IOException- if applying the rule fails
-
dump
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
IOException
-