public class HeaderPatternRule extends PatternRule
Rule.ApplyURI_pattern_handling, _terminating| Constructor | Description |
|---|---|
HeaderPatternRule() |
|
HeaderPatternRule(java.lang.String pattern,
java.lang.String name,
java.lang.String value) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
apply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
Invokes this method when a match found.
|
java.lang.String |
getName() |
Returns the header name.
|
java.lang.String |
getValue() |
Returns the header value.
|
boolean |
isAdd() |
Returns the add flag value.
|
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 header contents.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPattern, matchAndApply, setPatternisHandling, 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.public java.lang.String apply(java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
apply in class PatternRuletarget - field to attempt matchrequest - request objectresponse - response objectjava.io.IOException - exceptions dealing with operating on request or response objectsRule.matchAndApply(String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)public java.lang.String getName()
public java.lang.String getValue()
public boolean isAdd()
public java.lang.String toString()
toString in class PatternRuleCopyright © 1995–2018 Webtide. All rights reserved.