|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.util.CronSchedule
public class CronSchedule
Class to represent the schedule portion of a crontab-style specification.
Nested Class Summary | |
---|---|
static class |
CronSchedule.Field
Class representing one field of a crontab schedule specification. |
static class |
CronSchedule.SpecException
Exception class thrown to indicate a problem with a crontab schedule specification. |
Constructor Summary | |
---|---|
CronSchedule()
Create a CronSchedule instance. |
|
CronSchedule(String spec)
Construct a CronSchedule instance according to the passed crontab-style
specification. |
Method Summary | |
---|---|
CronSchedule.Field |
getDaysOfMonth()
Return the Field instance containing the "days-of-the-month" schedule. |
CronSchedule.Field |
getDaysOfWeek()
Return the Field instance containing the "day-of-the-week" schedule. |
CronSchedule.Field |
getHours()
Return the Field instance containing the "hours" schedule. |
CronSchedule.Field |
getMinutes()
Return the Field instance containing the "minutes" schedule. |
CronSchedule.Field |
getMonths()
Return the Field instance containing the "month-of-the-year" schedule. |
Calendar |
getNextScheduledTime()
Return a Calendar instance representing the next
instant in time that is scheduled by this CronSchedule
instance. |
Calendar |
getNextScheduledTime(Calendar start)
Return a Calendar instance representing the next
instant in time after the passed time that is scheduled by this CronSchedule
instance. |
boolean |
isScheduled(Calendar time)
Return true if the passed time is scheduled by this CronSchedule instance. |
void |
reset()
Set this instance to the equivalent of "* * * * *" . |
String |
toString()
Return a string representation of this CronSchedule instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CronSchedule()
CronSchedule
instance. The created instance
is the same as if it had been created bynew CronSchedule("* * * * *")
public CronSchedule(String spec) throws CronSchedule.SpecException
CronSchedule
instance according to the passed crontab-style
specification. The passed specification must have the 5 schedule fields
defined by crontab.
spec
- schedule specification
CronSchedule.SpecException
- thrown if there is something wrong with the
specification string.Method Detail |
---|
public void reset()
"* * * * *"
.
public CronSchedule.Field getMinutes()
Field
instance containing the "minutes" schedule.
Field
containing minutespublic CronSchedule.Field getHours()
Field
instance containing the "hours" schedule.
Field
containing hourspublic CronSchedule.Field getDaysOfMonth()
Field
instance containing the "days-of-the-month" schedule.
Field
containing days-of-the-monthpublic CronSchedule.Field getMonths()
Field
instance containing the "month-of-the-year" schedule.
Field
containing month-of-the-yearpublic CronSchedule.Field getDaysOfWeek()
Field
instance containing the "day-of-the-week" schedule.
Field
containing day-of-the-weekpublic boolean isScheduled(Calendar time)
true
if the passed time is scheduled by this CronSchedule
instance.
time
- time to check
true
if scheduledpublic Calendar getNextScheduledTime()
Calendar
instance representing the next
instant in time that is scheduled by this CronSchedule
instance.
This is a convenience method; it behaves as the following:getNextScheduledTime(Calendar.getInstance())
Calendar
instance representing the next scheduled time.public Calendar getNextScheduledTime(Calendar start)
Calendar
instance representing the next
instant in time after the passed time that is scheduled by this CronSchedule
instance.
start
- time from which to calculate the next scheduled time
Calendar
instance representing the next scheduled time after the
passed reference time.public String toString()
CronSchedule
instance. This will, in general,
be the same string that was used to construct the instance.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |