|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.jcrontab.Crontab
Manages the creation and execution of all the scheduled tasks of jcrontab. This class is the core of the jcrontab
| Method Summary | |
boolean |
deleteTask(int iTaskID)
Removes a task from the internal arrays of active tasks. |
CronTask[] |
getAllTasks()
Returns an array with all active tasks |
static Crontab |
getInstance()
Returns the only instance of this class we've choosen a singleton pattern to avoid launch different Crontab If you need diferent crontab classes to be launched only should Change the private constructor to public. |
java.lang.String |
getProperty(java.lang.String property)
This method gets the value of the given property |
void |
init()
Initializes the crontab, reading task table from configuration file |
void |
init(java.util.Properties props)
Used by the loadCrontabServlet to start Crontab with the configuration passed in a Properties object. |
void |
init(java.lang.String strFileName)
Initializes the crontab, reading task table from configuration file |
int |
newTask(java.lang.String strClassName,
java.lang.String strMethodName,
java.lang.String[] strExtraInfo)
Creates and runs a new task |
void |
setProperty(java.lang.String property,
java.lang.String value)
This method sets the given property |
void |
storeProperty(java.lang.String property,
java.lang.String value)
This method Stores in the properties File the given property and all the "live" properties |
void |
uninit()
UnInitializes the Crontab. |
void |
uninit(int iSecondsToWait)
UnInitializes the crontab. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Crontab getInstance()
public void init()
throws java.lang.Exception
java.lang.Exception
public void init(java.lang.String strFileName)
throws java.lang.Exception
strFileName - Name of the tasks configuration file
java.lang.Exception
public void init(java.util.Properties props)
throws java.lang.Exception
props - a Properties object
java.lang.Exceptionpublic void uninit()
public void uninit(int iSecondsToWait)
iSecondsToWait - Number of seconds to wait for the tasks to end
their process before returning from this methodpublic java.lang.String getProperty(java.lang.String property)
property -
public void setProperty(java.lang.String property,
java.lang.String value)
property - value -
public void storeProperty(java.lang.String property,
java.lang.String value)
property - value -
public int newTask(java.lang.String strClassName,
java.lang.String strMethodName,
java.lang.String[] strExtraInfo)
strClassName - Name of the taskstrMethodName - Name of the method that will be calledstrExtraInfo - Extra Information given to the task
public boolean deleteTask(int iTaskID)
iTaskID - Identifier of the task to delete
public CronTask[] getAllTasks()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||