org.eclipse.jetty.rewrite.handler
类 RedirectRegexRule

java.lang.Object
  继承者 org.eclipse.jetty.rewrite.handler.Rule
      继承者 org.eclipse.jetty.rewrite.handler.RegexRule
          继承者 org.eclipse.jetty.rewrite.handler.RedirectRegexRule

public class RedirectRegexRule
extends RegexRule

Redirects the response by matching with a regular expression. The replacement string may use $n" to replace the nth capture group.


嵌套类摘要
 
从类 org.eclipse.jetty.rewrite.handler.Rule 继承的嵌套类/接口
Rule.ApplyURI
 
字段摘要
 
从类 org.eclipse.jetty.rewrite.handler.RegexRule 继承的字段
_regex
 
从类 org.eclipse.jetty.rewrite.handler.Rule 继承的字段
_handling, _terminating
 
构造方法摘要
RedirectRegexRule()
           
 
方法摘要
protected  String apply(String target, HttpServletRequest request, HttpServletResponse response, Matcher matcher)
          Apply this rule to the request/response pair.
 void setReplacement(String replacement)
          Whenever a match is found, it replaces with this value.
 
从类 org.eclipse.jetty.rewrite.handler.RegexRule 继承的方法
getRegex, matchAndApply, setRegex, toString
 
从类 org.eclipse.jetty.rewrite.handler.Rule 继承的方法
isHandling, isTerminating, setHandling, setTerminating
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

RedirectRegexRule

public RedirectRegexRule()
方法详细信息

setReplacement

public void setReplacement(String replacement)
Whenever a match is found, it replaces with this value.

参数:
replacement - the replacement string.

apply

protected String apply(String target,
                       HttpServletRequest request,
                       HttpServletResponse response,
                       Matcher matcher)
                throws IOException
从类 RegexRule 复制的描述
Apply this rule to the request/response pair. Called by RegexRule.matchAndApply(String, HttpServletRequest, HttpServletResponse) if the regex matches.

指定者:
RegexRule 中的 apply
参数:
target - field to attempt match
request - request object
response - response object
matcher - The Regex matcher that matched the request (with capture groups available for replacement).
返回:
The target (possible updated).
抛出:
IOException - exceptions dealing with operating on request or response objects


Copyright © 2013. All Rights Reserved.