public class HeaderPatternRule extends PatternRule
Rule.ApplyURI_pattern_handling, _terminating| Constructor and Description |
|---|
HeaderPatternRule() |
| Modifier and Type | Method and 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.
|
getPattern, 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 © 2013 FuseSource, Corp.. All Rights Reserved.