|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.schedule.ScheduleExecution
public abstract class ScheduleExecution
An abstract implementation of ExecutionTimeProvider, already including time of day information, either of the form
"once at __:__" or "every ___ hours starting at __:__ until __ o'clock".
The most important methods are for setting the start time or the hour range. Note that these two are exclusive -
the one replaces the information set by the other.
To create an instance of ScheduleExecution, use the methods in ScheduleExecutionFactory.
OneDayExecution,
DailyExecution,
WeeklyExecution,
MonthlyExecution,
ScheduleExecutionFactory,
ExecutionTimeProvider| Method Summary | |
|---|---|
java.util.Date |
getEndDate()
Returns the end date for this execution time provider - that is, the last point in time this task is allowed to be executed. |
int |
getHour()
Returns the specific hour of day the task is to be executed at for the first time - if an hour range has been set, this will return the first hour of the hour range. |
int[] |
getHourRange()
Returns the range of hours (e.g. every hour from 12 to 16 would return {1,12,16}) |
int |
getLoopCount()
Get the amount of executions after this task is stopped. |
int |
getMinute()
Returns the specific minute of the hour the task is to be executed at. |
java.util.Date |
getNextExecutionTime()
The core of the object - must return the next point in time the task is to be executed. |
java.util.Date |
getStartDate()
Returns the start date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause the time information to be ignored.) for this execution time provider - that is, the first day this task is allowed to be executed. |
void |
setEndDate(java.util.Date endDate)
Sets the end date for this execution time provider - that is, the last point in time this task is allowed to be executed. |
void |
setHourRange(int stepSize,
int startHour,
int endHour)
Sets the hour range for this execution time. |
void |
setHourRange(int stepSize,
int startHour,
int endHour,
int minute)
Sets the hour range for this execution time. |
void |
setLoopCount(int loopCount)
Set after how many executions this task should stop. |
void |
setStartDate(java.util.Date date)
Sets the start date of the task. |
void |
setStartTime(int hour,
int minute)
Sets the task's starting time of day - causes this execution time to be of the form "once at __:__". |
| Method Detail |
|---|
public java.util.Date getNextExecutionTime()
getNextExecutionTime in interface ExecutionTimeProvider
public void setHourRange(int stepSize,
int startHour,
int endHour)
throws ScheduleException
stepSize - Interval length in hours (must be at least 1)startHour - First hour of the hour rangeendHour - Last hour of the hour range
ScheduleException - If the range is not legal, for example, if one of the numbers
is negative or if the end hour is earlier than the start hour
public void setHourRange(int stepSize,
int startHour,
int endHour,
int minute)
throws ScheduleException
stepSize - Interval length in hours (must be at least 1)startHour - First hour of the hour rangeendHour - Last hour of the hour rangeminute - Minute of the execution times
ScheduleException - If the range is not legal, for example, if one of the numbers
is negative or if the end hour is earlier than the start hourpublic java.util.Date getStartDate()
getStartDate in interface ExecutionTimeProvider
public void setStartDate(java.util.Date date)
throws ScheduleException
setStartDate in interface ExecutionTimeProviderdate - The start date (NOT to be mistaken for the point in time - the only thing that counts in the date object is the actual day - setting a Date object with time information will cause
the time information to be ignored.) to set. May not be null
ScheduleException - If date is null. (error code SE0044)public final java.util.Date getEndDate()
getEndDate in interface ExecutionTimeProviderpublic final void setEndDate(java.util.Date endDate)
setEndDate in interface ExecutionTimeProviderendDate - The end date for this execution time provider. If null, end date is set to non-existent.
public void setStartTime(int hour,
int minute)
throws ScheduleException
hour - Hour of day, minimum is 0 (meaning 12 a.m), maximum is 23 (meaning 11 p.m.)minute - Minute of the hour, minimum is 0, maximum is 59
ScheduleException - If the hour is not between 0 and 23, or the minute is not between 0 and 59.public int getHour()
public int getMinute()
public int[] getHourRange()
public void setLoopCount(int loopCount)
setLoopCount in interface ExecutionTimeProviderloopCount - after how many executions it should stop, use -1 for never, 0 means it will not be scheduled at all. When 0, ExecutionTimeProvider.getNextExecutionTime() will always return null.public int getLoopCount()
getLoopCount in interface ExecutionTimeProvider
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||