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 Dumpable
Dumpable.DumpableContainer -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aRuleto the existing ones.voidclear()Removes all the rules.voiddump(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.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 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
Description copied from interface:DumpableDump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dumpin interfaceDumpable- Parameters:
out- The appendable to dump toindent- The indent to apply after any new lines.- Throws:
IOException- if unable to write to Appendable
-