org.mortbay.jetty.handler.rewrite
public abstract class PatternRule extends Rule
PathMap
for pattern matching. It uses the
servlet pattern syntax.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_pattern |
_handling, _terminating
Constructor and Description |
---|
PatternRule() |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
apply(java.lang.String target,
HttpServletRequest request,
HttpServletResponse response)
Apply the rule to the request
|
java.lang.String |
getPattern() |
java.lang.String |
matchAndApply(java.lang.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 |
setPattern(java.lang.String pattern)
Sets the rule pattern.
|
java.lang.String |
toString()
Returns the rule pattern.
|
isHandling, isTerminating, setHandling, setTerminating
public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the patternpublic java.lang.String matchAndApply(java.lang.String target, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
Rule
matchAndApply
in class Rule
target
- The target of the requestjava.io.IOException
- TODOprotected abstract java.lang.String apply(java.lang.String target, HttpServletRequest request, 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 © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.