org.eclipse.jetty.rewrite.handler
类 ResponsePatternRule
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.PatternRule
org.eclipse.jetty.rewrite.handler.ResponsePatternRule
public class ResponsePatternRule
- extends PatternRule
Sends the response code whenever the rule finds a match.
ResponsePatternRule
public ResponsePatternRule()
setCode
public void setCode(String code)
- Sets the response status code.
- 参数:
code - response code
setReason
public void setReason(String reason)
- Sets the reason for the response status code. Reasons will only reflect
if the code value is greater or equal to 400.
- 参数:
reason -
apply
public String apply(String target,
HttpServletRequest request,
HttpServletResponse response)
throws IOException
- 从类
PatternRule 复制的描述
- Apply the rule to the request
- 指定者:
- 类
PatternRule 中的 apply
- 参数:
target - field to attempt matchrequest - request objectresponse - response object
- 返回:
- The target (possible updated)
- 抛出:
IOException - exceptions dealing with operating on request or response objects
toString
public String toString()
- Returns the code and reason string.
- 覆盖:
- 类
PatternRule 中的 toString
Copyright © 2013. All Rights Reserved.