|
||||||||||
| 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 String |
STATUS_ERROR
|
static String |
STATUS_FAILED
|
static String |
STATUS_PASSED
|
static String |
STATUS_UNKNOWN
|
| Constructor Summary | |
|---|---|
DiagnosticTaskResult(DiagnosticTask task)
Constructor requires a DiagnosticTask to store the result of its run. |
|
| Method Summary | |
|---|---|
void |
addToResults(List<DiagnosticTaskResult> results)
Dispatch method exists because of CompositeDiagnosticTaskResult. |
String |
getComment()
|
long |
getExecutionTime()
|
String |
getMessage()
|
String |
getStatus()
Indicates the outcome of the task |
DiagnosticTask |
getTask()
Return the DiagnosticTask for which the result hold the results. |
boolean |
hasComment()
|
boolean |
isError()
|
boolean |
isFailed()
|
boolean |
isPassed()
|
boolean |
isUnknown()
|
void |
logReport()
Write a log entry using the logger associated with SelfDiagnose. |
void |
setComment(String newComment)
|
void |
setErrorMessage(String aMessage)
Set the message explaining why the run has failed. |
void |
setExecutionTime(long executionTime)
|
void |
setFailedMessage(String failedMessage)
|
void |
setPassedMessage(String passedMessage)
Add a message to the list of reporting messages |
String |
toString()
|
boolean |
wantsToBeReported()
|
protected void |
writeMessagesOn(StringWriter writer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String STATUS_PASSED
public static final String STATUS_FAILED
public static final String STATUS_ERROR
public static final String STATUS_UNKNOWN
| Constructor Detail |
|---|
public DiagnosticTaskResult(DiagnosticTask task)
task - DiagnosticTask| Method Detail |
|---|
public String getStatus()
public boolean isError()
public boolean isFailed()
public boolean isPassed()
public boolean isUnknown()
public boolean wantsToBeReported()
public void setErrorMessage(String aMessage)
aMessage - public String getMessage()
public void logReport()
protected void writeMessagesOn(StringWriter writer)
public DiagnosticTask getTask()
public void setPassedMessage(String passedMessage)
passedMessage - Stringpublic void setFailedMessage(String failedMessage)
public long getExecutionTime()
public void setExecutionTime(long executionTime)
public void addToResults(List<DiagnosticTaskResult> results)
results - public String toString()
toString in class Objectpublic boolean hasComment()
public String getComment()
public void setComment(String newComment)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||