org.eclipse.jetty.rewrite.handler
public class RewritePatternRule extends PatternRule implements Rule.ApplyURI
PathMap
path with a fixed string.Rule.ApplyURI
_pattern
_handling, _terminating
Constructor and Description |
---|
RewritePatternRule() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
apply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Apply the rule to the request
|
void |
applyURI(Request request,
java.lang.String oldTarget,
java.lang.String newTarget) |
void |
setReplacement(java.lang.String value)
Whenever a match is found, it replaces with this value.
|
java.lang.String |
toString()
Returns the replacement string.
|
getPattern, matchAndApply, setPattern
isHandling, isTerminating, setHandling, setTerminating
public void setReplacement(java.lang.String value)
value
- the replacement string.public java.lang.String apply(java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
PatternRule
apply
in class PatternRule
target
- field to attempt matchrequest
- request objectresponse
- response objectjava.io.IOException
- exceptions dealing with operating on request or response objectspublic void applyURI(Request request, java.lang.String oldTarget, java.lang.String newTarget) throws java.io.IOException
applyURI
in interface Rule.ApplyURI
java.io.IOException
public java.lang.String toString()
toString
in class PatternRule
Copyright © 2013. All Rights Reserved.