com.philemonworks.selfdiagnose
Class CustomDiagnosticTask
java.lang.Object
com.philemonworks.selfdiagnose.DiagnosticTask
com.philemonworks.selfdiagnose.CustomDiagnosticTask
- All Implemented Interfaces:
- Serializable
public class CustomDiagnosticTask
- extends DiagnosticTask
CustomDiagnosticTask is a wrapper on a custom defined DiagnosticTask.
If the custom task could be created and initialized at configuration time then all messages are delegated to the task.
If the custom task could not be created then this class provides the error message with the reason every it is asked to run.
- Author:
- Ernest Micklei
- See Also:
- Serialized Form
Methods inherited from class com.philemonworks.selfdiagnose.DiagnosticTask |
getDefaultReportTemplate, getRequestor, getTaskName, getVariableName, hasComment, initializeFromAttributes, isReportResults, run, run, setComment, setReportResults, setRequestor, setVariableName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomDiagnosticTask
public CustomDiagnosticTask()
getDescription
public String getDescription()
- Specified by:
getDescription
in class DiagnosticTask
- Returns:
- String the description
createResult
public DiagnosticTaskResult createResult()
- Description copied from class:
DiagnosticTask
- Return an object to store the results of running the receiver.
- Overrides:
createResult
in class DiagnosticTask
- Returns:
- DiagnosticTaskResult
run
public void run(ExecutionContext ctx,
DiagnosticTaskResult result)
throws DiagnoseException
- Description copied from class:
DiagnosticTask
- Run the task. If an error is detected then raise a DiagnoseException.
Otherwise use the result object to the report any messages when a run is completed.
- Specified by:
run
in class DiagnosticTask
- Parameters:
ctx
- ExecutionContextresult
- DiagnosticTaskResult
- Throws:
DiagnoseException
setUp
public void setUp(ExecutionContext ctx)
throws DiagnoseException
- Description copied from class:
DiagnosticTask
- Override this method to verify that task parameters are initialized/set correctly.
- Overrides:
setUp
in class DiagnosticTask
- Parameters:
ctx
- ExecutionContext
- Throws:
DiagnoseException
getErrorMessage
public String getErrorMessage()
setErrorMessage
public void setErrorMessage(String errorMessage)
getTask
public DiagnosticTask getTask()
setTask
public void setTask(DiagnosticTask task)
getComment
public String getComment()
- Overrides:
getComment
in class DiagnosticTask
Copyright © 2012. All Rights Reserved.