|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
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_DAY
Milliseconds for one day. |
private static long |
EVERY_HOUR
Milliseconds for one hour. |
private static long |
EVERY_MINUTE
Milliseconds for one minute. |
private static long |
EVERY_MONTH
Milliseconds for one month. |
private static long |
EVERY_WEEK
Milliseconds for one week. |
private static long |
EVERY_YEAR
Milliseconds for one year. |
private org.apache.commons.logging.Log |
log
Provides a handle to Apache-commons logger |
private static int |
MAX_DAY_OF_MONTH
Maximum valid day of month value. |
private static int |
MAX_HOUR
Maximum valid hour value. |
private static int |
MAX_MINUTE
Maximum valid minute value. |
private static int |
MIN_DAY_OF_MONTH
Mininum valid day of month value. |
private static int |
MIN_HOUR
Mininum valid hour value. |
private static int |
MIN_MINUTE
Mininum valid minute value. |
private long |
period
Holds the period of how often the task will execute. |
private Date |
time
Holds 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 AbstractTask
timer
- 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 valueprivate 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 All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |