|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.ws.ffdc.DiagnosticModule
public class DiagnosticModule
Extend this class to create a diagnostic module to help FFDC capture and dump data for your component. Example usage:
DiagnosticModuleForComponent dm = new DiagnosticModuleForComponent(); if (FFDC.registerDiagnosticModule(dm, "com.ibm.ws.mycomponent.packagename") != 0) { // Diagnostic module failed to meet the criteria described above // Return codes : // 0 - DM was registered // 1 - A DM has already been registered with the package name // 2 - The DM did not meet the criteria to contain a single dump method // 3 - An unknown failure occured during the registration }Any methods beginning with "ffdcDump" will be recognized by the ffdc runtime, and used for data collection. These methods should expect the following parameters:
Method names that start with "ffdcDumpDefault" will always be called when this component is involved in an exception or error situation. These methods will be responsible for performing the default data capture for their component.
Method names that simply start with "ffdcDump" [not ffdcDumpDefault] are only called under certain conditions and are not considered part of the default data capture.
Methods that don't start with "ffdcDump", or that don't conform to the
expected signature will be ignored. Setting the
com.ibm.ws.ffdc.debugDiagnosticModule
system property to true
will cause exceptions to be thrown for malformed diagnostic module
signatures.
Field Summary | |
---|---|
static java.lang.String |
DEBUG_DM_PROPERTY
Name of property used to enable noise-making when badly formed methods are encountered when initializing a new module. |
static java.lang.String |
FFDC_DUMP_DEFAULT_PREFIX
The prefix of ffdcdumpdefault methods (compared using toLowerCase) |
static java.lang.String |
FFDC_DUMP_PREFIX
The prefix of ffdcdump methods (compared using toLowerCase) |
Constructor Summary | |
---|---|
DiagnosticModule()
|
Method Summary | |
---|---|
boolean |
dumpComponentData(java.lang.String[] input_directives,
java.lang.Throwable ex,
IncidentStream ffdcis,
java.lang.Object callerThis,
java.lang.Object[] catcherObjects,
java.lang.String sourceId,
java.lang.String[] callStack)
This method is invoked to instruct the diagnostic module to capture all relevant information that it has about a particular incident |
void |
getDataForDirectives(java.lang.String[] directives,
java.lang.Throwable ex,
IncidentStream ffdcis,
java.lang.Object callerThis,
java.lang.Object[] catcherObjects,
java.lang.String sourceId)
Invoke all the ffdcdump methods for a set of directives |
java.lang.String[] |
getDirectives()
Return the list of directives returned by this diagnostic module. |
void |
stopProcessingException()
Inform this base class (and the diagnostic engine) that no more diagnosis information is required for this incident |
boolean |
validate()
Validate whether the diagnostic module is correctly coded. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEBUG_DM_PROPERTY
public static final java.lang.String FFDC_DUMP_PREFIX
public static final java.lang.String FFDC_DUMP_DEFAULT_PREFIX
Constructor Detail |
---|
public DiagnosticModule()
Method Detail |
---|
public java.lang.String[] getDirectives()
public final boolean dumpComponentData(java.lang.String[] input_directives, java.lang.Throwable ex, IncidentStream ffdcis, java.lang.Object callerThis, java.lang.Object[] catcherObjects, java.lang.String sourceId, java.lang.String[] callStack)
input_directives
- The directives to be processed for this incidentex
- The exception that caused this incidentffdcis
- The incident stream to be used to record the relevant
informationcallerThis
- The object reporting the incidentcatcherObjects
- Additional objects that might be involvedsourceId
- The source id of the class reporting the incidentcallStack
- The list of classes on the stack
public final void getDataForDirectives(java.lang.String[] directives, java.lang.Throwable ex, IncidentStream ffdcis, java.lang.Object callerThis, java.lang.Object[] catcherObjects, java.lang.String sourceId)
directives
- The list of directives to be invokedex
- The exception causing the incidentffdcis
- The incident stream on which to reportcallerThis
- The object reporting the incidentcatcherObjects
- Any additional interesting objectssourceId
- The sourceid of the class reporting the problempublic final boolean validate()
public final void stopProcessingException()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |