org.eclipse.jetty.rewrite.handler
类 Rule

java.lang.Object
  继承者 org.eclipse.jetty.rewrite.handler.Rule
直接已知子类:
HeaderRule, LegacyRule, MsieSslRule, PatternRule, RegexRule, RuleContainer, ValidUrlRule

public abstract class Rule
extends Object

An abstract rule for creating rewrite rules.


嵌套类摘要
static interface Rule.ApplyURI
          Interface used to apply a changed target if RuleContainer.setRewriteRequestURI(boolean) is true.
 
字段摘要
protected  boolean _handling
           
protected  boolean _terminating
           
 
构造方法摘要
Rule()
           
 
方法摘要
 boolean isHandling()
          Returns the handling flag value.
 boolean isTerminating()
          Returns the terminating flag value.
abstract  String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response)
          This method calls tests the rule against the request/response pair and if the Rule applies, then the rule's action is triggered.
 void setHandling(boolean handling)
          Set the handling flag value.
 void setTerminating(boolean terminating)
          Sets terminating to true or false.
 String toString()
          Returns the handling and terminating flag values.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

_terminating

protected boolean _terminating

_handling

protected boolean _handling
构造方法详细信息

Rule

public Rule()
方法详细信息

matchAndApply

public abstract String matchAndApply(String target,
                                     HttpServletRequest request,
                                     HttpServletResponse response)
                              throws IOException
This method calls tests the rule against the request/response pair and if the Rule applies, then the rule's action is triggered.

参数:
target - The target of the request
request -
response -
返回:
The new target if the rule has matched, else null
抛出:
IOException - TODO

setTerminating

public void setTerminating(boolean terminating)
Sets terminating to true or false. If true, this rule will terminate the loop if this rule has been applied.

参数:
terminating -

isTerminating

public boolean isTerminating()
Returns the terminating flag value.

返回:
true if the rule needs to terminate; false otherwise.

isHandling

public boolean isHandling()
Returns the handling flag value.

返回:
true if the rule handles the request and nested handlers should not be called.

setHandling

public void setHandling(boolean handling)
Set the handling flag value.

参数:
handling - true if the rule handles the request and nested handlers should not be called.

toString

public String toString()
Returns the handling and terminating flag values.

覆盖:
Object 中的 toString


Copyright © 2013. All Rights Reserved.