public class HeaderRegexRule extends RegexRule
Rule.ApplyURI_handling, _terminating| Constructor and Description |
|---|
HeaderRegexRule() |
HeaderRegexRule(String regex,
String name,
String value) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
apply(String target,
HttpServletRequest request,
HttpServletResponse response,
Matcher matcher)
Apply this rule to the request/response pair.
|
String |
getName()
Returns the header name.
|
String |
getValue()
Returns the header value.
|
boolean |
isAdd() |
void |
setAdd(boolean add)
Sets the Add flag.
|
void |
setName(String name)
Sets the header name.
|
void |
setValue(String value)
Sets the header value.
|
String |
toString()
Returns the regular expression string.
|
getRegex, matchAndApply, setRegexisHandling, isTerminating, setHandling, setTerminatingpublic void setName(String name)
name - name of the header fieldpublic void setValue(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 String apply(String target, HttpServletRequest request, HttpServletResponse response, Matcher matcher) throws 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).IOException - exceptions dealing with operating on request or response objectspublic String getName()
public String getValue()
public boolean isAdd()
Copyright © 1995-2016 Webtide. All Rights Reserved.