|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.core.Schedule
public class Schedule
The Schedule provides a way to define the scheduling for an activity, allowing the capability to specify a time in the future when a specific activity when take place, and how long that activity should remain active.
| Field Summary | |
|---|---|
static long |
INDEFINITE
Constant indicating the activity has an indefinite duration or repeat count |
static long |
MINIMUM_REPEAT_INTERVAL
Constant indicating the minimum repeatInterval, 5 seconds |
| Constructor Summary | |
|---|---|
Schedule()
Create a Schedule with no configured attributes |
|
Schedule(int month,
int dayOfMonth,
int hour,
int minute,
long duration,
long repeatCount,
long repeatInterval)
Create a Schedule to start on a specific month, day, hour and minute in the future |
|
Schedule(int dayOfWeek,
int hour,
int minute,
long duration,
long repeatCount,
long repeatInterval)
Create a Schedule on a specific day, hour and minute in the future |
|
Schedule(int hour,
int minute,
long duration,
long repeatCount,
long repeatInterval)
Create a Schedule to start on a specific hour and minute in the future |
|
Schedule(int minute,
long duration,
long repeatCount,
long repeatInterval)
Create a Schedule to start at a specific minute in the future |
|
Schedule(long duration,
long repeatCount,
long repeatInterval)
Create a Schedule to start immediately |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
long |
getDuration()
Get the duration property |
long |
getRepeatCount()
Get the repeatCount property |
long |
getRepeatInterval()
Get the repeatInterval property |
Date |
getStartDate()
Get the startDate. |
int |
hashCode()
|
static void |
main(String[] args)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long INDEFINITE
public static final long MINIMUM_REPEAT_INTERVAL
| Constructor Detail |
|---|
public Schedule()
public Schedule(long duration,
long repeatCount,
long repeatInterval)
duration - How long (in milliseconds) the activity being scheduled
will remain active. If the intent is to keep the scheduled activity active
for an indeterminate time, use INDEFINITErepeatCount - The number of times the activity should repeat. Use
INDEFINTE if it should repeat forever. If this value
is >0, the duration value must not be INDEFINITErepeatInterval - The time (in milliseconds) between
executions. Only meaningful if repeatCount is >0
public Schedule(int minute,
long duration,
long repeatCount,
long repeatInterval)
minute - The minute of the hour to schedule an activity. If
the minute has already passed, then the Calendar will
be rolled forward to the next hourduration - How long (in milliseconds) the planned activity shall
be active. If the keep the scheduled activity active
for an indeterminate time, use INDEFINITErepeatCount - The number of times the activity should repeat. Use
INDEFINTE if it should repeat forever. If this value
is >0, the duration value must not be INDEFINITErepeatInterval - The time (in milliseconds) between
executions. Only meaningful if repeatCount is >0
public Schedule(int hour,
int minute,
long duration,
long repeatCount,
long repeatInterval)
hour - The hour of the day, in 24 hour format to schedule an
activity. If the hour has already passed, then the Calendar will
be rolled forward to the next dayminute - The minute of the hour to schedule an activity. If
the minute has already passed, then the Calendar will
be rolled forward to the next hourduration - How long (in milliseconds) the planned activity shall
be active. If the keep the scheduled activity active
for an indeterminate time, use INDEFINITErepeatCount - The number of times the activity should repeat. Use
INDEFINTE if it should repeat forever. If this value
is >0, the duration value must not be INDEFINITErepeatInterval - The time (in milliseconds) between
executions. Only meaningful if repeatCount is >0
public Schedule(int dayOfWeek,
int hour,
int minute,
long duration,
long repeatCount,
long repeatInterval)
dayOfWeek - The day of the week to schedule an activity. The
value must be either Calendar.SUNDAY, Calendar.MONDAY, Calendar.TUESDAY,
Calendar.WEDNESDAY, Calendar.THURSDAY, Calendar.FRIDAY or Calendar.SATURDAY
then the day of the week will be set to the current day. If the day has
already past, then the Calendar will be rolled forward one weekhour - The hour of the day, in 24 hour format to schedule an
activity. If the hour has already passed, then the Calendar will
be rolled forward to the next dayminute - The minute of the hour to schedule an activity. If
the minute has already passed, then the Calendar will
be rolled forward to the next hourduration - How long (in milliseconds) the planned activity shall
be active. If the keep the scheduled activity active
for an indeterminate time, use INDEFINITErepeatCount - The number of times the activity should repeat. Use
INDEFINTE if it should repeat forever. If this value
is >0, the duration value must not be INDEFINITErepeatInterval - The time (in milliseconds) between
executions. Only meaningful if repeatCount is >0
public Schedule(int month,
int dayOfMonth,
int hour,
int minute,
long duration,
long repeatCount,
long repeatInterval)
month - The month to schedule an activity. The value must be
either Calendar.JANUARY, Calendar.FEBRUARY, Calendar.MARCH, Calendar.APRIL,
Calendar.MAY, Calendar.JUNE, Calendar.JULY, Calendar.AUGUST,
Calendar.SEPTEMBER, Calendar.OCTOBER, Calendar.NOVEMBER, Calendar.DECEMBERdayOfMonth - The day of the monthhour - The hour of the day, in 24 hour format to schedule an
activity. If the hour has already passed, then the Calendar will
be rolled forward to the next dayminute - The minute of the hour to schedule an activity. If
the minute has already passed, then the Calendar will
be rolled forward to the next hourduration - How long (in milliseconds) the planned activity shall
be active. If the keep the scheduled activity active
for an indeterminate time, use INDEFINITErepeatCount - The number of times the activity should repeat. Use
INDEFINTE if it should repeat forever. If this value
is >0, the duration value must not be INDEFINITErepeatInterval - The time (in milliseconds) between
executions. Only meaningful if repeatCount is >0| Method Detail |
|---|
public Date getStartDate()
public long getDuration()
public long getRepeatCount()
public long getRepeatInterval()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic static void main(String[] args)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||