public class HeaderRegexRule extends RegexRule
Rule.ApplyURI_handling, _terminating| Constructor | Description |
|---|---|
HeaderRegexRule() |
|
HeaderRegexRule(java.lang.String regex,
java.lang.String name,
java.lang.String value) |
| Modifier and Type | Method | Description |
|---|---|---|
protected java.lang.String |
apply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.regex.Matcher matcher) |
Apply this rule to the request/response pair.
|
java.lang.String |
getName() |
Returns the header name.
|
java.lang.String |
getValue() |
Returns the header value.
|
boolean |
isAdd() |
|
void |
setAdd(boolean add) |
Sets the Add flag.
|
void |
setName(java.lang.String name) |
Sets the header name.
|
void |
setValue(java.lang.String value) |
Sets the header value.
|
java.lang.String |
toString() |
Returns the regular expression string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRegex, matchAndApply, setRegexisHandling, isTerminating, setHandling, setTerminatingpublic void setName(java.lang.String name)
name - name of the header fieldpublic void setValue(java.lang.String value)
String or int value.value - of the header fieldpublic void setAdd(boolean add)
add - If true, the header is added to the response, otherwise the header it is set on the response.protected java.lang.String apply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.regex.Matcher matcher)
throws java.io.IOException
RegexRuleRegexRule.matchAndApply(String, HttpServletRequest, HttpServletResponse) if the regex matches.apply in class RegexRuletarget - field to attempt matchrequest - request objectresponse - response objectmatcher - The Regex matcher that matched the request (with capture groups available for replacement).java.io.IOException - exceptions dealing with operating on request or response objectspublic java.lang.String getName()
public java.lang.String getValue()
public boolean isAdd()
Copyright © 1995–2018 Webtide. All rights reserved.