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,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Apply the rule to the request
|
String |
getHeader() |
String |
getHeaderValue() |
String |
matchAndApply(String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.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, setTerminatingpublic 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, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
RulematchAndApply in class Ruletarget - The target of the requestIOException - TODOprotected abstract String apply(String target, String value, javax.servlet.http.HttpServletRequest request, javax.servlet.http.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 Mort Bay Consulting. All Rights Reserved.