com.jfw.scheduler
Class Period

java.lang.Object
  extended by com.jfw.scheduler.ScheduleTypes
      extended by com.jfw.scheduler.Period

public final class Period
extends ScheduleTypes

Implements the logic for Period scheduling.
The scheduled classes of this type will run at scheduler startup and every period time.


Field Summary
 
Fields inherited from class com.jfw.scheduler.ScheduleTypes
className, EXECUTE_NOW_KEY, frequence, id, NEXT_EXECUTION_DATE_KEY, NEXT_EXECUTION_TIME_KEY, PREVIOUS_EXECUTION_DATE_KEY, PREVIOUS_EXECUTION_TIME_KEY, scheduleBean, scheduleThread, statusProperties
 
Constructor Summary
Period()
           
 
Method Summary
protected  java.util.Date getNextExecutionDate()
          Get the next execution day.
protected  void setParams()
          Set frequency parameters.
protected  void sleep()
          Implement the logic of sleep before the schedule bean is execute.
 
Methods inherited from class com.jfw.scheduler.ScheduleTypes
addError, commonSleep, existStatusProperties, getFileName, getScheduleObjectsPath, readStatus, saveStatus, updateProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Period

public Period()
Method Detail

setParams

protected void setParams()
Set frequency parameters.

Specified by:
setParams in class ScheduleTypes

sleep

protected void sleep()
              throws java.lang.Exception
Implement the logic of sleep before the schedule bean is execute. The first time the sleep is 0, so the schedule bean is execute immediately. After first time the frequency of bean execution depends by the configuration parameter.

Specified by:
sleep in class ScheduleTypes
Throws:
java.lang.Exception

getNextExecutionDate

protected java.util.Date getNextExecutionDate()
                                       throws java.lang.Exception
Get the next execution day.

Specified by:
getNextExecutionDate in class ScheduleTypes
Returns:
always null.
Throws:
java.lang.Exception