com.caucho.resources
Class CronResource

java.lang.Object
  extended by com.caucho.jca.AbstractResourceAdapter
      extended by com.caucho.resources.CronResource
All Implemented Interfaces:
AlarmListener, java.util.EventListener, ResourceAdapter

public class CronResource
extends AbstractResourceAdapter
implements AlarmListener

The cron resources starts application Work tasks at cron-specified intervals.


Constructor Summary
CronResource()
          Constructor.
 
Method Summary
 void handleAlarm(Alarm alarm)
          The runnable.
 void init()
          Initialization.
 void setCron(CronType cron)
          Sets the cron interval.
 void setWork(java.lang.Runnable work)
          Sets the work task.
 void start(BootstrapContext ctx)
          Starting.
 void stop()
          Stopping.
 
Methods inherited from class com.caucho.jca.AbstractResourceAdapter
endpointActivation, endpointDeactivation, getXAResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CronResource

public CronResource()
Constructor.

Method Detail

setCron

public void setCron(CronType cron)
Sets the cron interval.


setWork

public void setWork(java.lang.Runnable work)
Sets the work task.


init

public void init()
          throws ConfigException
Initialization.

Throws:
ConfigException

start

public void start(BootstrapContext ctx)
Starting.

Specified by:
start in interface ResourceAdapter
Overrides:
start in class AbstractResourceAdapter

handleAlarm

public void handleAlarm(Alarm alarm)
The runnable.

Specified by:
handleAlarm in interface AlarmListener

stop

public void stop()
Stopping.

Specified by:
stop in interface ResourceAdapter
Overrides:
stop in class AbstractResourceAdapter