Class VirtualHostRuleContainer
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.RuleContainer
org.eclipse.jetty.rewrite.handler.VirtualHostRuleContainer
Groups rules that apply only to one or more specific virtual hosts.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.rewrite.handler.Rule
Rule.Handler, Rule.HttpURIHandler
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Field Summary
Fields inherited from class org.eclipse.jetty.rewrite.handler.RuleContainer
ORIGINAL_QUERYSTRING_ATTRIBUTE_SUFFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addVirtualHost
(String virtualHost) Add the virtual host to add to the existing list of virtual hosts.matchAndApply
(Rule.Handler input) Processes the rules.void
setVirtualHosts
(List<String> virtualHosts) Sets the virtual hosts to match for the rules within this container to be applied.Methods inherited from class org.eclipse.jetty.rewrite.handler.RuleContainer
addRule, clear, dump, getOriginalPathAttribute, getRules, iterator, setOriginalPathAttribute, setRules
Methods inherited from class org.eclipse.jetty.rewrite.handler.Rule
isTerminating, setTerminating, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
VirtualHostRuleContainer
public VirtualHostRuleContainer()
-
-
Method Details
-
getVirtualHosts
- Returns:
- the virtual hosts to match
-
setVirtualHosts
Sets the virtual hosts to match for the rules within this container to be applied.
- Parameters:
virtualHosts
- the virtual hosts to match
-
addVirtualHost
Add the virtual host to add to the existing list of virtual hosts.- Parameters:
virtualHost
- the virtual host to add to the existing list of virtual hosts
-
matchAndApply
Description copied from class:RuleContainer
Processes the rules.
- Overrides:
matchAndApply
in classRuleContainer
- Parameters:
input
- the inputRequest
andHandler
- Returns:
- a
Request
andHandler
, possibly wrapped by rules to implement the rule's logic, ornull
if no rule matched - Throws:
IOException
- if applying the rule fails
-