com.caucho.server.rewrite
Class HeaderCondition

java.lang.Object
  extended by com.caucho.server.rewrite.AbstractCondition
      extended by com.caucho.server.rewrite.HeaderCondition
All Implemented Interfaces:
Condition

public class HeaderCondition
extends AbstractCondition

A rewrite condition that passes if the value of a named header matches a regexp.


Method Summary
 java.lang.String getTagName()
          Returns a descriptive name for the tag, for logging and for error messages.
 void init()
          Called at initialization time.
 boolean isMatch(HttpServletRequest request, HttpServletResponse response)
          Returns true if the condition passes.
 void setCaseInsensitive(boolean caseInsensitive)
           
 void setRegexp(java.util.regex.Pattern pattern)
           
 void setSendVary(boolean sendVary)
           
 
Methods inherited from class com.caucho.server.rewrite.AbstractCondition
addHeaderValue, destroy, required
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTagName

public java.lang.String getTagName()
Description copied from interface: Condition
Returns a descriptive name for the tag, for logging and for error messages.

Specified by:
getTagName in interface Condition
Overrides:
getTagName in class AbstractCondition

setRegexp

public void setRegexp(java.util.regex.Pattern pattern)

setCaseInsensitive

public void setCaseInsensitive(boolean caseInsensitive)

setSendVary

public void setSendVary(boolean sendVary)

init

@PostConstruct
public void init()
Description copied from interface: Condition
Called at initialization time.

Specified by:
init in interface Condition
Overrides:
init in class AbstractCondition

isMatch

public boolean isMatch(HttpServletRequest request,
                       HttpServletResponse response)
Description copied from interface: Condition
Returns true if the condition passes.