public class ValidUrlRule extends Rule
The logic is as follows.
Rule.ApplyURI
_handling, _terminating
Constructor | Description |
---|---|
ValidUrlRule() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
isValidChar(int codepoint) |
|
java.lang.String |
matchAndApply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.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 |
setCode(java.lang.String code) |
Sets the response status code.
|
void |
setReason(java.lang.String reason) |
Sets the reason for the response status code.
|
java.lang.String |
toString() |
Returns the handling and terminating flag values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isHandling, isTerminating, setHandling, setTerminating
public void setCode(java.lang.String code)
code
- response codepublic void setReason(java.lang.String reason)
reason
- the reasonpublic java.lang.String matchAndApply(java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
Rule
matchAndApply
in class Rule
target
- The target of the requestrequest
- the requestresponse
- the responsejava.io.IOException
- if unable to match the ruleprotected boolean isValidChar(int codepoint)
Copyright © 1995–2018 Webtide. All rights reserved.