public abstract class PatternRule extends Rule
PathMap
for pattern matching. It uses the
servlet pattern syntax.Rule.ApplyURI
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_pattern |
_handling, _terminating
Modifier | Constructor and Description |
---|---|
protected |
PatternRule() |
protected |
PatternRule(java.lang.String pattern) |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
apply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Apply the rule to the request
|
java.lang.String |
getPattern() |
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 |
setPattern(java.lang.String pattern)
Sets the rule pattern.
|
java.lang.String |
toString()
Returns the rule pattern.
|
isHandling, isTerminating, setHandling, setTerminating
protected PatternRule()
protected PatternRule(java.lang.String pattern)
public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the patternpublic 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 abstract java.lang.String apply(java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
target
- field to attempt matchrequest
- request objectresponse
- response objectjava.io.IOException
- exceptions dealing with operating on request or response objectsCopyright © 1995–2023 Webtide. All rights reserved.