|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.apache.turbine.om.BaseObject
|
+--org.apache.turbine.services.schedule.JobEntry
This is a wrapper for a scheduled job. It is modeled after the Unix scheduler cron.
| Field Summary |
| Fields inherited from class org.apache.turbine.om.BaseObject |
NEW_ID |
| Constructor Summary | |
JobEntry(int sec,
int min,
int hour,
int wd,
int day_mo,
java.lang.String task)
Constuctor. |
|
| Method Summary | |
void |
calcRunTime()
Calculate how long before the next runtime. The runtime determines it's position in the job queue. |
boolean |
equals(java.lang.Object je)
Compare this Job with another. |
int |
getDay_of_month()
Get the value of day_of_month. |
java.lang.String |
getEmail()
Return the e-mail address for notification. |
int |
getHour()
Get the value of hour. |
int |
getMinute()
Get the value of minute. |
java.lang.String |
getNextRunAsString()
Get the next runtime for this job as a String. |
long |
getNextRuntime()
Get the next runtime for this job as a long. |
java.util.Hashtable |
getProperty()
Get extra job properties |
int |
getSecond()
Get the value of second. |
java.lang.String |
getTask()
Return the task for this job. |
int |
getWeekday()
Get the value of weekday. |
boolean |
isActive()
Check to see if job is currently active/running |
void |
save()
Self-preservation. |
void |
setActive(boolean isActive)
Sets whether the job is running. |
void |
setDay_of_month(int v)
Set the value of day_of_month. |
void |
setEmail(java.lang.String mail)
The address to send mail notifications to. |
void |
setHour(int v)
Set the value of hour. |
void |
setMinute(int v)
Set the value of minute. |
void |
setProperty(java.util.Hashtable prop)
Set job properties |
void |
setSecond(int v)
Set the value of second. |
void |
setTask(java.lang.String task)
Set the task name for this job. |
void |
setWeekday(int v)
Set the value of weekday. |
| Methods inherited from class org.apache.turbine.om.BaseObject |
equals, getByName, getByPeerName, getByPosition, getPrimaryKey, getPrimaryKeyAsBigDecimal, getPrimaryKeyAsInt, getPrimaryKeyAsLong, getPrimaryKeyAsString, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey, setPrimaryKey, setPrimaryKey |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JobEntry(int sec,
int min,
int hour,
int wd,
int day_mo,
java.lang.String task)
throws java.lang.Exception
sec - Value for entry "seconds".min - Value for entry "minutes".hour - Value for entry "hours".wd - Value for entry "week days".day_mo - Value for entry "month days".task - Task to execute.
Exception, - a generic exception.
java.lang.Exception| Method Detail |
public void calcRunTime()
throws java.lang.Exception
Exception, - a generic exception.
java.lang.Exceptionpublic long getNextRuntime()
public java.lang.String getNextRunAsString()
public void setEmail(java.lang.String mail)
mail - The email address.public java.lang.String getEmail()
public java.lang.String getTask()
public void setTask(java.lang.String task)
task - A String with the name of the job.public int getSecond()
public void setSecond(int v)
v - Value to assign to second.public int getMinute()
public void setMinute(int v)
v - Value to assign to minute.public int getHour()
public void setHour(int v)
v - Value to assign to hour.public int getWeekday()
public void setWeekday(int v)
v - Value to assign to weekday.public int getDay_of_month()
public void setDay_of_month(int v)
v - Value to assign to day_of_month.
public void save()
throws java.lang.Exception
save in interface Persistentsave in class BaseObjectException, - a generic exception.
java.lang.Exceptionpublic boolean equals(java.lang.Object je)
equals in class BaseObjectje - The JobEntry object to compare to.
public void setActive(boolean isActive)
isActive - Whether the job is running.public boolean isActive()
public void setProperty(java.util.Hashtable prop)
public java.util.Hashtable getProperty()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||