|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.util.CronJob
public class CronJob
A cron entry, derived from Protomatter's CronEntry class. This class encapsulates a function call, a timeout value and a specification for when the given event should be delivered to the given topics. The specification of when the event should be delivered is based on the UNIX cron facility.
Constructor Summary | |
---|---|
CronJob(java.lang.String name)
Create an empty CronJob. |
Method Summary | |
---|---|
void |
addDay(int day)
Add a day of the month to the list of years this entry applies to. |
void |
addHour(int hour)
Add an hour to the list of years this entry applies to. |
void |
addMinute(int minute)
Add a minute to the list of years this entry applies to. |
void |
addMonth(int month)
Add a month to the list of years this entry applies to. |
void |
addWeekday(int weekday)
Add a weekday to the list of years this entry applies to. |
void |
addYear(int year)
Add a year to the list of years this entry applies to. |
boolean |
appliesToDate(java.util.Date date)
Determines if this CronJob applies to the given date. |
java.lang.String |
getFunction()
Get this entry's function |
java.lang.String |
getName()
Get this entry's name |
long |
getTimeout()
Get this entry's timeout |
static long |
millisToNextFullMinute()
|
static CronJob |
newJob(java.lang.String functionName,
java.lang.String year,
java.lang.String month,
java.lang.String day,
java.lang.String weekday,
java.lang.String hour,
java.lang.String minute)
A method for parsing properties. |
static long |
nextFullMinute()
|
static java.util.List |
parse(java.util.Properties props)
|
void |
parseDay(java.lang.String day)
|
void |
parseHour(java.lang.String hour)
|
void |
parseMinute(java.lang.String minute)
|
void |
parseMonth(java.lang.String value)
|
void |
parseTimeout(java.lang.String timeout)
|
void |
parseWeekDay(java.lang.String weekday)
|
void |
parseYear(java.lang.String value)
|
void |
removeDay(int day)
Remove a day of the month from the list of years this entry applies to. |
void |
removeHour(int hour)
Remove an hour from the list of years this entry applies to. |
void |
removeMinute(int minute)
Remove a minute from the list of years this entry applies to. |
void |
removeMonth(int month)
Remove a month from the list of years this entry applies to. |
void |
removeWeekday(int weekday)
Remove a weekday from the list of years this entry applies to. |
void |
removeYear(int year)
Remove a year from the list of years this entry applies to. |
void |
setAllDays(boolean set)
Should the current day of the month be taken into consideration when deciding if this entry is applicable? |
void |
setAllHours(boolean set)
Should the current hour be taken into consideration when deciding if this entry is applicable? |
void |
setAllMinutes(boolean set)
Should the current minute be taken into consideration when deciding if this entry is applicable? |
void |
setAllMonths(boolean set)
Should the current month be taken into consideration when deciding if this entry is applicable? |
void |
setAllWeekdays(boolean set)
Should the current weekday be taken into consideration when deciding if this entry is applicable? |
void |
setAllYears(boolean set)
Should the current year be taken into consideration when deciding if this entry is applicable? |
void |
setFunction(java.lang.String function)
Set this entry's function |
void |
setName(java.lang.String name)
Set this entry's name |
void |
setTimeout(long timeout)
Set this entry's timeout |
static java.util.List |
sort(java.util.List list)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CronJob(java.lang.String name)
Method Detail |
---|
public static CronJob newJob(java.lang.String functionName, java.lang.String year, java.lang.String month, java.lang.String day, java.lang.String weekday, java.lang.String hour, java.lang.String minute)
cron.name1.function = functionname cron.name1.year = year-list cron.name1.month = month-list cron.name1.day = day-list cron.name1.weekday = weekday-list cron.name1.hour = hour-list cron.name1.minute = minute-list cron.name1.timeout = timeout-value
And delivers corresponding CronJob objects in a collection. The specified lists from above are:
public static java.util.List parse(java.util.Properties props)
public static java.util.List sort(java.util.List list)
public void parseYear(java.lang.String value)
public void parseMonth(java.lang.String value)
public void parseDay(java.lang.String day)
public void parseWeekDay(java.lang.String weekday)
public void parseHour(java.lang.String hour)
public void parseMinute(java.lang.String minute)
public void parseTimeout(java.lang.String timeout)
public static long nextFullMinute()
public static long millisToNextFullMinute()
public boolean appliesToDate(java.util.Date date)
public void addYear(int year)
public void removeYear(int year)
public void setAllYears(boolean set)
public void addMonth(int month)
public void removeMonth(int month)
public void setAllMonths(boolean set)
public void addDay(int day)
public void removeDay(int day)
public void setAllDays(boolean set)
public void addWeekday(int weekday)
public void removeWeekday(int weekday)
public void setAllWeekdays(boolean set)
public void addHour(int hour)
public void removeHour(int hour)
public void setAllHours(boolean set)
public void addMinute(int minute)
public void removeMinute(int minute)
public void setAllMinutes(boolean set)
public void setName(java.lang.String name)
public java.lang.String getName()
public void setFunction(java.lang.String function)
public java.lang.String getFunction()
public void setTimeout(long timeout)
public long getTimeout()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |