| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--org.sape.carbon.services.scheduler.AbstractTask
        |
        +--org.sape.carbon.services.scheduler.FixedRateTask
Utility class used to interperet FixedRateTaskConfiguration and schedule fixed rate tasks. Copyright 2002 Sapient
| Nested Class Summary | 
| Nested classes inherited from class org.sape.carbon.services.scheduler.AbstractTask | 
|  | 
| Field Summary | |
| private static long | EVERY_DAYMilliseconds for one day. | 
| private static long | EVERY_HOURMilliseconds for one hour. | 
| private static long | EVERY_MINUTEMilliseconds for one minute. | 
| private static long | EVERY_MONTHMilliseconds for one month. | 
| private static long | EVERY_WEEKMilliseconds for one week. | 
| private static long | EVERY_YEARMilliseconds for one year. | 
| private  org.apache.commons.logging.Log | logProvides a handle to Apache-commons logger | 
| private static int | MAX_DAY_OF_MONTHMaximum valid day of month value. | 
| private static int | MAX_HOURMaximum valid hour value. | 
| private static int | MAX_MINUTEMaximum valid minute value. | 
| private static int | MIN_DAY_OF_MONTHMininum valid day of month value. | 
| private static int | MIN_HOURMininum valid hour value. | 
| private static int | MIN_MINUTEMininum valid minute value. | 
| private  long | periodHolds the period of how often the task will execute. | 
| private  Date | timeHolds the first run time of the task. | 
| Fields inherited from class org.sape.carbon.services.scheduler.AbstractTask | 
|  | 
| Constructor Summary | |
| protected  | FixedRateTask(FixedRateTaskConfiguration taskConfiguration,
              ThreadPool threadPool)This constructor determines the starting time and date and the repeat period of the task. | 
| Method Summary | |
| private  boolean | isWithinRange(int value,
              int min,
              int max)Checks if a value is in given range. | 
|  void | schedule(Timer timer)Method called to schedule this task on the given Timer. | 
| private  void | validate(String configName,
         String attributeName,
         Integer value,
         int minValue,
         int maxValue)Checks to make sure that value is within min and max values | 
| 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 | 
private org.apache.commons.logging.Log log
private static final int MIN_MINUTE
private static final int MAX_MINUTE
private static final int MIN_HOUR
private static final int MAX_HOUR
private static final int MIN_DAY_OF_MONTH
private static final int MAX_DAY_OF_MONTH
private static final long EVERY_MINUTE
private static final long EVERY_HOUR
private static final long EVERY_DAY
private static final long EVERY_WEEK
private static final long EVERY_MONTH
private static final long EVERY_YEAR
private long period
private Date time
| Constructor Detail | 
protected FixedRateTask(FixedRateTaskConfiguration taskConfiguration,
                        ThreadPool threadPool)
taskConfiguration - FixedRateTaskConfiguration| Method Detail | 
public void schedule(Timer timer)
AbstractTask
schedule in class AbstractTasktimer - Timer on which this task should be scheduledAbstractTask.schedule(Timer)
private void validate(String configName,
                      String attributeName,
                      Integer value,
                      int minValue,
                      int maxValue)
configName - configuration the value being validated comes fromattributeName - name of attribute being validatedvalue - the value of the attributeminValue - the minimum valid valuemaxValue - the maximum valid value
private boolean isWithinRange(int value,
                              int min,
                              int max)
value - the value to checkmin - the mininum the value should bemax - the maximum the value should be
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||