public class HeaderPatternRule extends PatternRule
Rule.ApplyURI
_pattern
_handling, _terminating
Constructor and Description |
---|
HeaderPatternRule() |
Modifier and Type | Method and Description |
---|---|
String |
apply(String target,
HttpServletRequest request,
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, setPattern
isHandling, isTerminating, setHandling, setTerminating
public 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, HttpServletRequest request, HttpServletResponse response) throws IOException
apply
in class PatternRule
target
- 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 PatternRule
Copyright © 1995-2015 Webtide. All Rights Reserved.