|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jwarp.service.work.AJob
This is the abstract base class who helps implementing job enities. It implements the IJob interface.
| Field Summary | |
protected java.util.Date |
creationDate
|
protected java.lang.String |
exitResult
|
protected java.util.Date |
finishedDate
|
protected int |
id
|
protected long |
maxTime
|
protected int |
priority
|
protected java.lang.String |
reference
|
protected java.util.Date |
startDate
|
protected int |
status
|
protected int |
user
|
| Fields inherited from interface org.jwarp.service.work.IJob |
ANY, STATUS_ACTIVE, STATUS_CREATED, STATUS_EXITED_ERROR, STATUS_EXITED_OK |
| Constructor Summary | |
AJob(int id,
int user,
java.lang.String reference)
|
|
AJob(int id,
int user,
java.lang.String reference,
long maxTime)
|
|
| Method Summary | |
protected abstract void |
doWork()
|
java.util.Date |
getCreationDate()
The date time of the creation of this job. |
java.lang.String |
getExitResult()
|
java.util.Date |
getFinishedDate()
The date time of the execution or null if the job is not executed yet. |
int |
getId()
Returns the ID of the job. |
long |
getMaxTime()
Returns the result of the calculation. |
int |
getPriority()
Return the job's desired priority |
java.lang.String |
getReference()
The user who created this job. |
java.util.Date |
getStartDate()
The date time of the execution or null if the job is not executed yet. |
int |
getStatus()
This returns the status of the job as defined in the constants. |
long |
getTotalRuntime()
Returns the result of the calculation. |
int |
getUser()
The user who created this job. |
protected void |
jobFinished()
|
protected void |
jobFinishedWithError(java.lang.String errorString)
|
protected void |
jobStarted()
|
void |
run()
|
void |
setCreationDate(java.util.Date date)
|
void |
setExitResult(java.lang.String result)
|
void |
setFinishedDate(java.util.Date date)
The date time of the execution or null if the job is not executed yet. |
void |
setId(int id)
|
void |
setMaxTime(long newTime)
|
void |
setPriority(int prio)
|
void |
setReference(java.lang.String ref)
|
void |
setStartDate(java.util.Date date)
|
void |
setStatus()
|
void |
setStatus(int status)
|
void |
setUser(int user)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected int status
protected java.lang.String exitResult
protected int user
protected java.lang.String reference
protected java.util.Date creationDate
protected long maxTime
protected java.util.Date startDate
protected java.util.Date finishedDate
protected int id
protected int priority
| Constructor Detail |
public AJob(int id,
int user,
java.lang.String reference)
public AJob(int id,
int user,
java.lang.String reference,
long maxTime)
| Method Detail |
public int getStatus()
getStatus in interface IJobpublic void setStatus()
public java.lang.String getReference()
IJobgetReference in interface IJoborg.jwarp.service.work.IJobpublic void setReference(java.lang.String ref)
protected void jobStarted()
throws InvalidJobStateException
protected void jobFinished()
throws InvalidJobStateException
protected abstract void doWork()
throws java.lang.Exception
public void run()
run in interface java.lang.Runnable
protected void jobFinishedWithError(java.lang.String errorString)
throws InvalidJobStateException
public int getId()
getId in interface IJobpublic int getPriority()
getPriority in interface IJobpublic void setPriority(int prio)
public int getUser()
getUser in interface IJobpublic void setUser(int user)
public java.util.Date getCreationDate()
getCreationDate in interface IJob
public void setCreationDate(java.util.Date date)
throws java.lang.IllegalAccessException
public java.util.Date getStartDate()
getStartDate in interface IJob
public void setStartDate(java.util.Date date)
throws java.lang.IllegalAccessException
public java.util.Date getFinishedDate()
getFinishedDate in interface IJobpublic long getTotalRuntime()
getTotalRuntime in interface IJobpublic void setMaxTime(long newTime)
public java.lang.String getExitResult()
public void setId(int id)
throws java.lang.IllegalAccessException
public long getMaxTime()
IJobgetMaxTime in interface IJoborg.jwarp.service.work.IJob
public void setStatus(int status)
throws java.lang.IllegalAccessException
public void setExitResult(java.lang.String result)
throws java.lang.IllegalAccessException
public void setFinishedDate(java.util.Date date)
throws java.lang.IllegalAccessException
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||