public class HeaderPatternRule extends PatternRule
Rule.ApplyURI_pattern_handling, _terminating| Constructor and Description |
|---|
HeaderPatternRule() |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Invokes this method when a match found.
|
String |
getName()
Returns the header name.
|
String |
getValue()
Returns the header value.
|
boolean |
isAdd()
Returns the add flag value.
|
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 header contents.
|
getPattern, matchAndApply, setPatternisHandling, 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.public String apply(String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
apply in class PatternRuletarget - field to attempt matchrequest - request objectresponse - response objectIOException - exceptions dealing with operating on request or response objectsRule.matchAndApply(String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)public String getName()
public String getValue()
public boolean isAdd()
public String toString()
toString in class PatternRuleCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.