org.eclipse.jetty.rewrite.handler
类 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


嵌套类摘要
 
从类 org.eclipse.jetty.rewrite.handler.Rule 继承的嵌套类/接口
Rule.ApplyURI
 
字段摘要
 
从类 org.eclipse.jetty.rewrite.handler.RuleContainer 继承的字段
_legacy, _originalPathAttribute, _rewritePathInfo, _rewriteRequestURI, _rules
 
从类 org.eclipse.jetty.rewrite.handler.Rule 继承的字段
_handling, _terminating
 
构造方法摘要
VirtualHostRuleContainer()
           
 
方法摘要
 void addVirtualHost(String virtualHost)
           
 String[] getVirtualHosts()
          Get the virtual hosts that the rules within this container will apply to
 String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response)
          Process the contained rules if the request is applicable to the virtual hosts of this rule
 void setVirtualHosts(String[] virtualHosts)
          Set the virtual hosts that the rules within this container will apply to
 
从类 org.eclipse.jetty.rewrite.handler.RuleContainer 继承的方法
addRule, apply, getLegacyRule, getOriginalPathAttribute, getRules, isRewritePathInfo, isRewriteRequestURI, setLegacyRule, setOriginalPathAttribute, setRewritePathInfo, setRewriteRequestURI, setRules
 
从类 org.eclipse.jetty.rewrite.handler.Rule 继承的方法
isHandling, isTerminating, setHandling, setTerminating, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

VirtualHostRuleContainer

public VirtualHostRuleContainer()
方法详细信息

setVirtualHosts

public void setVirtualHosts(String[] virtualHosts)
Set the virtual hosts that the rules within this container will apply to

参数:
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 String[] getVirtualHosts()
Get the virtual hosts that the rules within this container will apply to

返回:
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(String virtualHost)
参数:
virtualHost - add a virtual host to the existing list of virtual hosts A null hostname means any hostname is acceptable

matchAndApply

public String matchAndApply(String target,
                            HttpServletRequest request,
                            HttpServletResponse response)
                     throws IOException
Process the contained rules if the request is applicable to the virtual hosts of this rule

覆盖:
RuleContainer 中的 matchAndApply
参数:
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
返回:
The new target if the rule has matched, else null
抛出:
IOException - TODO


Copyright © 2013. All Rights Reserved.