public abstract class HeaderRule extends Rule
Rule.ApplyURI
_handling, _terminating
Constructor and Description |
---|
HeaderRule() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
apply(String target,
String value,
HttpServletRequest request,
HttpServletResponse response)
Apply the rule to the request
|
String |
getHeader() |
String |
getHeaderValue() |
String |
matchAndApply(String target,
HttpServletRequest request,
HttpServletResponse response)
This method calls tests the rule against the request/response pair and if the Rule
applies, then the rule's action is triggered.
|
void |
setHeader(String header) |
void |
setHeaderValue(String headerValue) |
String |
toString()
Returns the handling and terminating flag values.
|
isHandling, isTerminating, setHandling, setTerminating
public String getHeader()
public void setHeader(String header)
header
- the header name to check forpublic String getHeaderValue()
public void setHeaderValue(String headerValue)
headerValue
- the header value to match against. If null, then the
presence of the header is enough to matchpublic String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
Rule
matchAndApply
in class Rule
target
- The target of the requestIOException
protected abstract String apply(String target, String value, HttpServletRequest request, HttpServletResponse response) throws IOException
target
- field to attempt matchvalue
- header value foundrequest
- request objectresponse
- response objectIOException
- exceptions dealing with operating on request or response
objectsCopyright © 1995-2015 Webtide. All Rights Reserved.