|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.services.crontab.Crontab
This is the main API controller class that deals with the various crontab entries.
| Field Summary | |
protected SortedSet |
queue
The queue waiting for execution. |
protected CronDaemon |
waiter
The thread that manages the crontab entries. |
| Constructor Summary | |
Crontab()
Default constructor |
|
Crontab(boolean isDaemon,
String threadName)
Construct the Crontab thread |
|
| Method Summary | |
void |
addCrontabEntry(CrontabEntry entry)
Add a constructed Crontab entry to the Crontab. |
CrontabEntry |
addCrontabEntry(Date date,
CrontabListenerI listener)
Add a crontab entry |
CrontabEntry |
addCrontabEntry(int delay,
boolean isRepetitive,
CrontabListenerI listener)
Add a crontab entry |
CrontabEntry |
addCrontabEntry(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int year,
CrontabListenerI listener)
Adds a crontab to execute based upon various Cron-like parameters as numbers |
CrontabEntry |
addCrontabEntry(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int year,
String label,
CrontabListenerI listener)
Adds a crontab to execute based upon various Cron-like parameters as numbers |
CrontabEntry |
addCrontabEntry(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int year,
String label,
CrontabListenerI listener,
String jobNumber)
Adds a crontab to execute based upon various Cron-like parameters as numbers |
boolean |
containsCrontabEntry(CrontabEntry oneEntry)
Checks if a given crontab entry is sitting in the queue waiting for execution |
void |
finalize()
Clearing the cron thread if the crontab is killed |
List |
getAllEntries()
Retrieve a list of all items that are part of the queue. |
protected void |
notifyListeners()
When this is called, we execute the given crontab |
void |
removeAllCrontabEntries()
Remove all existing crontabs from the crontab entry. |
boolean |
removeCrontabEntry(CrontabEntry entry)
Remove a given crontab entry from the crontab |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected CronDaemon waiter
protected SortedSet queue
| Constructor Detail |
public Crontab(boolean isDaemon,
String threadName)
isDaemon - set to true if the crontab should be a daemon threadthreadName - the name of the threadpublic Crontab()
| Method Detail |
public CrontabEntry addCrontabEntry(Date date,
CrontabListenerI listener)
throws CronException
date - the date for the crontab entry to executelistener - the listener interface
CronException - upon error constructing the CrontabEntry
public CrontabEntry addCrontabEntry(int delay,
boolean isRepetitive,
CrontabListenerI listener)
throws CronException
delay - the delay in(?) before executing the crontabisRepetitive - true if the crontab is repetitive, ie should it execute
every X many secondslistener - the listener to get notified when a crontab executes
CronException - upon error creating the crontab entry
public CrontabEntry addCrontabEntry(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int year,
CrontabListenerI listener)
throws CronException
minute - execute every X minuteshour - execute every X hoursdayOfMonth - execute every X days of the monthmonth - execute every X days of the monthdayOfWeek - execute every specified day of the weekyear - execute every X specified yearslistener - the listener to get notified when the crontab's time is
due
CronException - upon construction error
public CrontabEntry addCrontabEntry(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int year,
String label,
CrontabListenerI listener)
throws CronException
minute - execute every X minuteshour - execute every X hoursdayOfMonth - execute every X days of the monthmonth - execute every X days of the monthdayOfWeek - execute every specified day of the weekyear - execute every X specified yearslabel - Useful label for possible debugging purposeslistener - the listener to get notified when the crontab's time is
due
CronException - upon construction error
public CrontabEntry addCrontabEntry(int minute,
int hour,
int dayOfMonth,
int month,
int dayOfWeek,
int year,
String label,
CrontabListenerI listener,
String jobNumber)
throws CronException
minute - execute every X minuteshour - execute every X hoursdayOfMonth - execute every X days of the monthmonth - execute every X days of the monthdayOfWeek - execute every specified day of the weekyear - execute every X specified yearslabel - Useful label for possible debugging purposeslistener - the listener to get notified when the crontab's time is
duejobNumber - Job Number for this CrontabEntry's associated JobQueue entry
CronException - upon construction error
public void addCrontabEntry(CrontabEntry entry)
throws CronException
entry - the entry to add
CronExceptionpublic boolean removeCrontabEntry(CrontabEntry entry)
entry - the entry to remove
public void removeAllCrontabEntries()
public boolean containsCrontabEntry(CrontabEntry oneEntry)
oneEntry - a given entry.
public List getAllEntries()
protected void notifyListeners()
public void finalize()
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||