| java.lang.Object com.jcorporate.expresso.services.crontab.Crontab
Crontab | public class Crontab (Code) | | This is the main API controller class that deals with the various crontab
entries.
author: Mike Dubman |
Method Summary | |
public synchronized CrontabEntry | addCrontabEntry(Date date, CrontabListenerI listener) | public synchronized CrontabEntry | addCrontabEntry(int delay, boolean isRepetitive, CrontabListenerI listener) | public synchronized CrontabEntry | addCrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, CrontabListenerI listener) | public synchronized CrontabEntry | addCrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, String label, CrontabListenerI listener) | public synchronized CrontabEntry | addCrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, String label, CrontabListenerI listener, String jobNumber) | public synchronized void | addCrontabEntry(CrontabEntry entry) Add a constructed Crontab entry to the Crontab. | public synchronized boolean | containsCrontabEntry(CrontabEntry oneEntry) Checks if a given crontab entry is sitting in the queue waiting for execution
Parameters: oneEntry - a given entry. | public void | finalize() | public synchronized List | getAllEntries() Retrieve a list of all items that are part of the queue. | protected synchronized void | notifyListeners() | public synchronized void | removeAllCrontabEntries() Remove all existing crontabs from the crontab entry. | public synchronized boolean | removeCrontabEntry(CrontabEntry entry) |
queue | protected SortedSet queue(Code) | | The queue waiting for execution. Sorting in the set is determined
by the next execution time.
|
waiter | protected CronDaemon waiter(Code) | | The thread that manages the crontab entries. It does so by simply ringing
this particular class that a cron is ready to run.
|
Crontab | public Crontab(boolean isDaemon, String threadName)(Code) | | Construct the Crontab thread
Parameters: isDaemon - set to true if the crontab should be a daemon thread Parameters: threadName - the name of the thread |
Crontab | public Crontab()(Code) | | Default constructor
|
addCrontabEntry | public synchronized CrontabEntry addCrontabEntry(Date date, CrontabListenerI listener) throws CronException(Code) | | Add a crontab entry
Parameters: date - the date for the crontab entry to execute Parameters: listener - the listener interface CrontabEntry representing what was just constructed throws: CronException - upon error constructing the CrontabEntry |
addCrontabEntry | public synchronized CrontabEntry addCrontabEntry(int delay, boolean isRepetitive, CrontabListenerI listener) throws CronException(Code) | | Add a crontab entry
Parameters: delay - the delay in(?) before executing the crontab Parameters: isRepetitive - true if the crontab is repetitive, ie should it executeevery X many seconds Parameters: listener - the listener to get notified when a crontab executes CrontabEntry throws: CronException - upon error creating the crontab entry |
addCrontabEntry | public synchronized CrontabEntry addCrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, CrontabListenerI listener) throws CronException(Code) | | Adds a crontab to execute based upon various Cron-like parameters as
numbers
Parameters: minute - execute every X minutes Parameters: hour - execute every X hours Parameters: dayOfMonth - execute every X days of the month Parameters: month - execute every X days of the month Parameters: dayOfWeek - execute every specified day of the week Parameters: year - execute every X specified years Parameters: listener - the listener to get notified when the crontab's time isdue Crontab Entry throws: CronException - upon construction error |
addCrontabEntry | public synchronized CrontabEntry addCrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, String label, CrontabListenerI listener) throws CronException(Code) | | Adds a crontab to execute based upon various Cron-like parameters as
numbers
Parameters: minute - execute every X minutes Parameters: hour - execute every X hours Parameters: dayOfMonth - execute every X days of the month Parameters: month - execute every X days of the month Parameters: dayOfWeek - execute every specified day of the week Parameters: year - execute every X specified years Parameters: label - Useful label for possible debugging purposes Parameters: listener - the listener to get notified when the crontab's time isdue Crontab Entry throws: CronException - upon construction error |
addCrontabEntry | public synchronized CrontabEntry addCrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, String label, CrontabListenerI listener, String jobNumber) throws CronException(Code) | | Adds a crontab to execute based upon various Cron-like parameters as
numbers
Parameters: minute - execute every X minutes Parameters: hour - execute every X hours Parameters: dayOfMonth - execute every X days of the month Parameters: month - execute every X days of the month Parameters: dayOfWeek - execute every specified day of the week Parameters: year - execute every X specified years Parameters: label - Useful label for possible debugging purposes Parameters: listener - the listener to get notified when the crontab's time isdue Parameters: jobNumber - Job Number for this CrontabEntry's associated JobQueue entry Crontab Entry throws: CronException - upon construction error |
addCrontabEntry | public synchronized void addCrontabEntry(CrontabEntry entry) throws CronException(Code) | | Add a constructed Crontab entry to the Crontab.
Parameters: entry - the entry to add |
containsCrontabEntry | public synchronized boolean containsCrontabEntry(CrontabEntry oneEntry)(Code) | | Checks if a given crontab entry is sitting in the queue waiting for execution
Parameters: oneEntry - a given entry. true if the given entry exists in the queue |
finalize | public void finalize()(Code) | | Clearing the cron thread if the crontab is killed
|
getAllEntries | public synchronized List getAllEntries()(Code) | | Retrieve a list of all items that are part of the queue.
a List of CrontabEntry objects |
notifyListeners | protected synchronized void notifyListeners()(Code) | | When this is called, we execute the given crontab
|
removeAllCrontabEntries | public synchronized void removeAllCrontabEntries()(Code) | | Remove all existing crontabs from the crontab entry.
|
removeCrontabEntry | public synchronized boolean removeCrontabEntry(CrontabEntry entry)(Code) | | Remove a given crontab entry from the crontab
Parameters: entry - the entry to remove boolean |
|
|