|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.rewrite.handler.Rule org.eclipse.jetty.rewrite.handler.PatternRule org.eclipse.jetty.rewrite.handler.HeaderPatternRule
public class HeaderPatternRule
Sets the header in the response whenever the rule finds a match.
Field Summary |
---|
Fields inherited from class org.eclipse.jetty.rewrite.handler.PatternRule |
---|
_pattern |
Fields inherited from class org.eclipse.jetty.rewrite.handler.Rule |
---|
_handling, _terminating |
Constructor Summary | |
---|---|
HeaderPatternRule()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.jetty.rewrite.handler.PatternRule |
---|
getPattern, matchAndApply, setPattern |
Methods inherited from class org.eclipse.jetty.rewrite.handler.Rule |
---|
isHandling, isTerminating, setHandling, setTerminating |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HeaderPatternRule()
Method Detail |
---|
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 object
IOException
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |