com.caucho.rewrite
Class IfCron

java.lang.Object
  extended by com.caucho.rewrite.IfCron
All Implemented Interfaces:
RequestPredicate

@Configurable
public class IfCron
extends java.lang.Object
implements RequestPredicate

Match if the request occurs during enabled times.

 <resin:Allow url-pattern="/admin/*">
                  xmlns:resin="urn:java:com.caucho.resin">
   <resin:IfCron>
     <enable-at>* 8 * * *
     <disable-at>* 16 * * *
   </resin:IfCron>
 </resin:Allow>
 

RequestPredicates may be used for security and rewrite actions.


Constructor Summary
IfCron()
           
 
Method Summary
 void init()
           
 boolean isMatch(HttpServletRequest request)
          True if the predicate matches.
 void setDisableAt(CronType disableAt)
          Sets the cron disable times.
 void setEnableAt(CronType enableAt)
          Sets the cron enable times.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfCron

public IfCron()
Method Detail

setEnableAt

@Configurable
public void setEnableAt(CronType enableAt)
Sets the cron enable times.


setDisableAt

@Configurable
public void setDisableAt(CronType disableAt)
Sets the cron disable times.


init

@PostConstruct
public void init()

isMatch

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

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