|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.philemonworks.selfdiagnose.DiagnosticTaskResult
public class DiagnosticTaskResult
DiagnosticTaskResult hold information about the execution of a DiagnosticTask and known how to create a report for logging.
| Field Summary | |
|---|---|
static java.lang.String |
STATUS_ERROR
|
static java.lang.String |
STATUS_FAILED
|
static java.lang.String |
STATUS_PASSED
|
| Constructor Summary | |
|---|---|
DiagnosticTaskResult(DiagnosticTask task)
Constructor requires a DiagnosticTask to store the result of its run. |
|
| Method Summary | |
|---|---|
void |
addToResults(java.util.List results)
Dispatch method exists because of CompositeDiagnosticTaskResult. |
long |
getExecutionTime()
|
java.lang.String |
getMessage()
|
java.lang.String |
getStatus()
Indicates the outcome of the task |
DiagnosticTask |
getTask()
Return the DiagnosticTask for which the result hold the results. |
boolean |
isError()
|
boolean |
isFailed()
|
boolean |
isPassed()
|
void |
logReport()
Write a log entry using the logger associated with SelfDiagnose. |
void |
setErrorMessage(java.lang.String aMessage)
Set the message explaining why the run has failed. |
void |
setExecutionTime(long executionTime)
|
void |
setFailedMessage(java.lang.String failedMessage)
|
void |
setPassedMessage(java.lang.String passedMessage)
Add a message to the list of reporting messages |
protected void |
writeMessagesOn(java.io.StringWriter writer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STATUS_PASSED
public static final java.lang.String STATUS_FAILED
public static final java.lang.String STATUS_ERROR
| Constructor Detail |
|---|
public DiagnosticTaskResult(DiagnosticTask task)
task - DiagnosticTask| Method Detail |
|---|
public java.lang.String getStatus()
public boolean isError()
public boolean isFailed()
public boolean isPassed()
public void setErrorMessage(java.lang.String aMessage)
aMessage - public java.lang.String getMessage()
public void logReport()
protected void writeMessagesOn(java.io.StringWriter writer)
public DiagnosticTask getTask()
public void setPassedMessage(java.lang.String passedMessage)
passedMessage - Stringpublic void setFailedMessage(java.lang.String failedMessage)
public long getExecutionTime()
public void setExecutionTime(long executionTime)
public void addToResults(java.util.List results)
results -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||