com.caucho.rewrite
Class IfMethod

java.lang.Object
  extended by com.caucho.rewrite.IfMethod
All Implemented Interfaces:
CacheablePredicate, RequestPredicate

@Configurable
public class IfMethod
extends java.lang.Object
implements RequestPredicate, CacheablePredicate

Match if the HTTP method matches the value.

 <resin:Forbidden
             xmlns:resin="urn:java:com.caucho.resin">
   <resin:Method method="POST"/>
 </resin:Forbidden>
 

RequestPredicates may be used for security and rewrite actions.


Constructor Summary
IfMethod()
           
 
Method Summary
 void init()
           
 boolean isMatch(HttpServletRequest request)
          True if the predicate matches.
 void setMethod(java.lang.String value)
          Sets the HTTP method value to test: GET, POST, etc..
 void setValue(java.lang.String value)
          Sets the HTTP method value to test.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IfMethod

public IfMethod()
Method Detail

setMethod

@Configurable
public void setMethod(java.lang.String value)
Sets the HTTP method value to test: GET, POST, etc..


setValue

@Configurable
public void setValue(java.lang.String value)
Sets the HTTP method value to test.


init

@PostConstruct
public void init()

isMatch

public boolean isMatch(HttpServletRequest request)
True if the predicate matches.

Specified by:
isMatch in interface CacheablePredicate
Specified by:
isMatch in interface RequestPredicate
Parameters:
request - the servlet request to test

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object