Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.rewrite.handler
Class VirtualHostRuleContainer

    java.lang.Object
      org.eclipse.jetty.rewrite.handler.Rule
          org.eclipse.jetty.rewrite.handler.RuleContainer
              org.eclipse.jetty.rewrite.handler.VirtualHostRuleContainer

    public class VirtualHostRuleContainer

extends RuleContainer

Groups rules that apply only to a specific virtual host or sets of virtual hosts

Field Summary

Fields inherited from class org.eclipse.jetty.rewrite.handler.RuleContainer
`_legacy, _originalPathAttribute, _rewritePathInfo, _rewriteRequestURI, _rules`

Fields inherited from class org.eclipse.jetty.rewrite.handler.Rule
`_handling, _terminating`

Constructor Summary
`VirtualHostRuleContainer()`

Method Summary
`void` | `addVirtualHost(java.lang.String virtualHost)`
`java.lang.String[]` | `getVirtualHosts()` Get the virtual hosts that the rules within this container will apply to
`java.lang.String` | `matchAndApply(java.lang.String target, HttpServletRequest request, HttpServletResponse response)` Process the contained rules if the request is applicable to the virtual hosts of this rule
`void` | `setVirtualHosts(java.lang.String[] virtualHosts)` Set the virtual hosts that the rules within this container will apply to

Methods inherited from class org.eclipse.jetty.rewrite.handler.RuleContainer
`addRule, apply, getLegacyRule, getOriginalPathAttribute, getRules, isRewritePathInfo, isRewriteRequestURI, setLegacyRule, setOriginalPathAttribute, setRewritePathInfo, setRewriteRequestURI, setRules`

Methods inherited from class org.eclipse.jetty.rewrite.handler.Rule
`isHandling, isTerminating, setHandling, setTerminating, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### VirtualHostRuleContainer

    public VirtualHostRuleContainer()

Method Detail

### setVirtualHosts

    public void setVirtualHosts(java.lang.String[] virtualHosts)

  Set the virtual hosts that the rules within this container will apply to

  Parameters:
    `virtualHosts` - Array of virtual hosts that the rules within this container are applied to. A null hostname or null/empty array means any hostname is acceptable.

### getVirtualHosts

    public java.lang.String[] getVirtualHosts()

  Get the virtual hosts that the rules within this container will apply to

  Returns:
    Array of virtual hosts that the rules within this container are applied to. A null hostname or null/empty array means any hostname is acceptable.

### addVirtualHost

    public void addVirtualHost(java.lang.String virtualHost)

  Parameters:
    `virtualHost` - add a virtual host to the existing list of virtual hosts A null hostname means any hostname is acceptable

### matchAndApply

    public java.lang.String matchAndApply(java.lang.String target,
                                          HttpServletRequest request,
                                          HttpServletResponse response)
                                   throws java.io.IOException

  Process the contained rules if the request is applicable to the virtual hosts of this rule

  Overrides:
    `matchAndApply` in class `RuleContainer`
  Parameters:
    `target` - target field to pass on to the contained rules
    `request` - request object to pass on to the contained rules
    `response` - response object to pass on to the contained rules
  Returns:
    The new target if the rule has matched, else null
  Throws:
    `java.io.IOException` - TODO

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.