|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mybatchfwk.ExecutionReport
public class ExecutionReport
A basic execution report.
It contains informations about the batch execution: begin date, end date, identity of completed and failed tasks.
It is used for creating reports (mail, logs, ...) after the batch has been completed or after a fatal error.
User can create his own execution report to store extra informations about the completions and the failures.
| Field Summary | |
|---|---|
protected java.util.Date |
beginDate
Begin date of the execution |
protected java.util.Date |
endDate
End date of the execution |
protected IExecutionHistory |
history
The execution history |
protected long |
numberOfCompletedTasks
The number of completed tasks |
protected long |
numberOfFailedTasks
The number of failed tasks |
| Constructor Summary | |
|---|---|
ExecutionReport()
Default constructor |
|
ExecutionReport(IExecutionHistory history)
|
|
| Method Summary | |
|---|---|
java.util.Iterator |
completedTasksIdIterator()
Return an iterator over the id of the completed tasks, provided by the execution history |
java.util.Iterator |
failedTasksIdIterator()
Return an iterator over the id of the failed tasks, provided by the execution history |
java.util.Date |
getBeginDate()
Return the begin date of the execution |
java.util.Date |
getEndDate()
Return the end date of the execution |
IExecutionHistory |
getHistory()
|
long |
getNumberOfCompletedTasks()
|
long |
getNumberOfFailedTasks()
|
void |
reportCompletion(ITask task)
Store informations about a task completion. |
void |
reportFailure(ITask task,
java.lang.Throwable throwable)
Store informations about a task failure. |
void |
setBeginDate(java.util.Date beginDate)
Set the begin date of the execution |
void |
setEndDate(java.util.Date endDate)
Set the end date of the execution |
void |
setHistory(IExecutionHistory history)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Date beginDate
protected java.util.Date endDate
protected volatile long numberOfCompletedTasks
protected volatile long numberOfFailedTasks
protected IExecutionHistory history
| Constructor Detail |
|---|
public ExecutionReport()
public ExecutionReport(IExecutionHistory history)
| Method Detail |
|---|
public void reportCompletion(ITask task)
task - the completed task
public void reportFailure(ITask task,
java.lang.Throwable throwable)
task - the failed taskthrowable - the cause of the failure
public java.util.Iterator completedTasksIdIterator()
throws BatchException
BatchException
public java.util.Iterator failedTasksIdIterator()
throws BatchException
BatchExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Date getBeginDate()
public void setBeginDate(java.util.Date beginDate)
beginDate - the begin date to setpublic java.util.Date getEndDate()
public void setEndDate(java.util.Date endDate)
endDate - the end date to setpublic long getNumberOfCompletedTasks()
public long getNumberOfFailedTasks()
public IExecutionHistory getHistory()
public void setHistory(IExecutionHistory history)
history - the history to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||