|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.philemonworks.selfdiagnose.SelfDiagnose
public abstract class SelfDiagnose
SelfDiagnose is the component that keeps a registration of DiagnosticTasks and can run them providing a simple report that is logged using Log4j. Registration is done:
Field Summary | |
---|---|
static String |
CONFIG
|
static String |
COPYRIGHT
|
static String |
MDC_SELFDIAGNOSE_TASK_RESULT
|
static String |
VERSION
The name of the resource that holds the specification of tasks. |
Constructor Summary | |
---|---|
SelfDiagnose()
|
Method Summary | |
---|---|
static void |
configure(InputStream is)
Read the configuration from an InputStream |
static void |
configure(String resourceName)
Try to configure SelfDiagnose using the XML configuration file with the given resource name. |
static void |
configure(URL configURL)
Read the configuration from the resource by URL. |
static void |
flush()
Flush all registered tasks |
static String |
getConfigFilename()
Return the filename that is used to configure SelfDiagnose |
static List<DiagnosticTask> |
getTasks()
Return the modifiable collection of registered Diagnostic tasks. |
static DiagnosticTask |
register(DiagnosticTask task)
Add the argument to the global list of Diagnostic tasks. |
static DiagnosticTask |
register(DiagnosticTask task,
String identifier)
Add the argument to the global list of Diagnostic tasks. |
static void |
reloadConfiguration()
Flush all registered tasks from the configuration and re-load the configuration. |
static void |
run()
Run all registered DiagnosticTasks and report to the LOG. |
static DiagnoseRun |
runTasks()
|
static DiagnoseRun |
runTasks(DiagnoseRunReporter reporter)
Basic method to run all registered tasks. |
static DiagnoseRun |
runTasks(DiagnoseRunReporter reporter,
ExecutionContext ctx)
Basic method to run all registered tasks. |
static DiagnoseRun |
runTasks(List<DiagnosticTask> taskList,
DiagnoseRunReporter reporter,
ExecutionContext ctx)
Basic method to the tasks provided |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MDC_SELFDIAGNOSE_TASK_RESULT
public static final String VERSION
public static final String COPYRIGHT
public static final String CONFIG
Constructor Detail |
---|
public SelfDiagnose()
Method Detail |
---|
public static String getConfigFilename()
public static void configure(String resourceName)
resourceName
- : Stringpublic static void configure(URL configURL)
configURL
- : URLpublic static void configure(InputStream is) throws Exception
is
-
Exception
public static void reloadConfiguration()
public static DiagnosticTask register(DiagnosticTask task)
task
- DiagnosticTask
public static DiagnosticTask register(DiagnosticTask task, String identifier)
task
- DiagnosticTaskidentifier
- String
public static DiagnoseRun runTasks()
public static DiagnoseRun runTasks(DiagnoseRunReporter reporter)
public static DiagnoseRun runTasks(DiagnoseRunReporter reporter, ExecutionContext ctx)
public static DiagnoseRun runTasks(List<DiagnosticTask> taskList, DiagnoseRunReporter reporter, ExecutionContext ctx)
public static void run()
public static void flush()
public static List<DiagnosticTask> getTasks()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |