org.sape.carbon.services.scheduler
Class FixedDelayTask

java.lang.Object
  |
  +--org.sape.carbon.services.scheduler.AbstractTask
        |
        +--org.sape.carbon.services.scheduler.FixedDelayTask

class FixedDelayTask
extends AbstractTask

Utility class used to interperet FixedDelayTaskConfiguration and schedule fixed delay tasks. Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.13 $($Author: dvoet $ / $Date: 2003/11/20 21:46:15 $)
Author:
Douglas Voet, June 2002

Nested Class Summary
 
Nested classes inherited from class org.sape.carbon.services.scheduler.AbstractTask
 
Field Summary
private  long delay
          Holds the initial delay before the tasks execute.
private  long period
          Holds the period of how often the task will execute.
 
Fields inherited from class org.sape.carbon.services.scheduler.AbstractTask
 
Constructor Summary
protected FixedDelayTask(FixedDelayTaskConfiguration taskConfiguration, ThreadPool threadPool)
          Loads and validates configuration information.
 
Method Summary
 void schedule(Timer timer)
          Method called to schedule this task on the given Timer.
 
Methods inherited from class org.sape.carbon.services.scheduler.AbstractTask
getTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

period

private long period
Holds the period of how often the task will execute.


delay

private long delay
Holds the initial delay before the tasks execute.

Constructor Detail

FixedDelayTask

protected FixedDelayTask(FixedDelayTaskConfiguration taskConfiguration,
                         ThreadPool threadPool)
Loads and validates configuration information.

Parameters:
taskConfiguration - configuration for this task
Method Detail

schedule

public void schedule(Timer timer)
Description copied from class: AbstractTask
Method called to schedule this task on the given Timer. Implementations are responsible for determining when to schedule this task, its repeat period and how it is scheduled (fixed rate or delay). To this end, one of the schedule mehtods on timer should be called.

Specified by:
schedule in class AbstractTask
Parameters:
timer - Timer on which this task should be scheduled
See Also:
AbstractTask.schedule(Timer)


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.