|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAnalyzerContext
Define the Context in which analyzers will operate. The context provides a starting point in the dump for each analyzer to analyse. Typically this will be a JavaRuntime but it may be a generic ManagedRuntime. In the general case an Image may contain multiple address spaces each of which may contain multiple processes that in turn may contain multiple runtimes. In the usual case we have a single address space, single process and single runtime which is a Java runtime. Hence we can save every analyzer the tedious task of navigating down to the runtime in order to start analysis. At present we give the analyzer the complete context although that might not be such a good idea in the long term since the analyzer might choose to consider the entire image rather than just the runtime. To handle the rare case of dumps with multiple runtimes we allow an analyzer to get hold of an alternative context on the assumption that the required runtimeID string can be pulled from a hat somewhere by the analyzer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.ibm.dtfj.analyzer.ext.IMessageLogger |
---|
IMessageLogger.LocalLevel |
Field Summary |
---|
Fields inherited from interface com.ibm.dtfj.analyzer.ext.IMessageLogger |
---|
LEVEL_DBDA_DUMP_MAJOR, LEVEL_DBDA_DUMP_MINOR, LEVEL_DBDA_DUMP_MINOR_FULL, LEVEL_DBDA_INFO, LEVEL_DBDA_OBSERVATION_HIGH, LEVEL_DBDA_OBSERVATION_LOW, LEVEL_DBDA_OBSERVATION_MEDIUM, LEVEL_DBDA_TOOL_MAJOR, LEVEL_DBDA_TOOL_MINOR, LEVEL_DBDA_TOOL_MINOR_FULL |
Method Summary | |
---|---|
IAnalysisReport |
allocateReport(java.lang.String name,
java.lang.String version)
Build a report from the given analyzer name and version. |
IAnalysisReport |
allocateReport(java.lang.String name,
java.lang.String version,
java.lang.Object refKey)
|
int |
analyzeResponse(java.lang.String analyzerName,
java.lang.String[] response,
java.lang.String rule)
Invoke a named analyzer to evaluate the given response values and return some indication of the value of a given analyzer-specific rule. |
java.lang.String[] |
doAnalysis(java.lang.String analyzerName)
Request a specific named analyzer to do some analysis of the current image and return the response values. |
IAnalyzerContext |
getAnalyzerForRuntimeID(java.lang.String ID)
Return an analyzer for a given runtime ID. |
java.util.List |
getContextAttributes()
Return a List containing the tag values of all the context attributes previously specified in calls to setContextAttribute(int, String) . |
com.ibm.dtfj.image.ImageAddressSpace |
getCurrentAddressSpace()
Return the current address space |
java.lang.String |
getCurrentDumpName()
Return the current dump name or null if we haven't defined one yet |
com.ibm.dtfj.image.Image |
getCurrentImage()
Return the current image |
com.ibm.dtfj.image.ImageFactory |
getCurrentImageFactory()
Return the current image factory |
com.ibm.dtfj.java.JavaRuntime |
getCurrentJavaRuntime()
Return the current Java runtime or exception if the current runtime is not a Java runtime |
com.ibm.dtfj.image.ImageProcess |
getCurrentProcess()
Return the current process |
com.ibm.dtfj.runtime.ManagedRuntime |
getCurrentRuntime()
Return the current managed runtime which typically will be be a JavaRuntime |
java.lang.String |
getCurrentRuntimeID()
Return a unique identifier for the runtime we are operating on. |
java.util.logging.Logger |
getLogger()
Get hold of a logger to record debugging information. |
RuntimeParameters |
getRuntimeParameters()
Return the runtime parameters which were used to invoke the analysis. |
java.lang.String |
getVersion()
Return the analyzer context version identifier |
java.lang.String[] |
listRules(java.lang.String analyzerName)
Request the list of rules that a given named analyzer implements. |
IAnalyzerBase |
loadAnalyzer(java.lang.String analyzerName)
Load the requested analyzer and return a reference to it. |
IAnalyzerBase |
loadAnalyzer(java.lang.String analyzerName,
java.lang.Object parent)
Load the requested analyzer and return a reference to it. |
void |
notifyAnalysisPhase(IAnalyzerBase analyzer,
int phase,
int target)
Used by an analyzer to report the analysis phase and the total expected number of phases. |
boolean |
notifyAnalysisProgress(IAnalyzerBase analyzer,
int progress,
int target)
Used by an analyzer to report the progress of an analysis phase and the expected target value. |
void |
outputMessage(java.lang.String msg)
Output a given message to the 'console' of the analyzer. |
IAnalysisReport |
produceReport(java.lang.String analyzerName)
Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter. |
IAnalysisReport |
produceReport(java.lang.String analyzerName,
java.lang.String[] response,
java.lang.String rule,
int state)
When the response has been analysed we have produced some state value. |
void |
setContextAttribute(int precedence,
java.lang.String tag)
Specify a new attribute associated with this analyzer context. |
Methods inherited from interface com.ibm.dtfj.analyzer.ext.IMessageLogger |
---|
getMessages, getMessages, getMessages, getResourceBundleName, logMessage, logMessage, logTranslatedMessage, logTranslatedMessage, printReportStatistics |
Method Detail |
---|
java.lang.String getVersion()
com.ibm.dtfj.image.Image getCurrentImage()
com.ibm.dtfj.image.ImageFactory getCurrentImageFactory()
com.ibm.dtfj.image.ImageAddressSpace getCurrentAddressSpace()
com.ibm.dtfj.image.ImageProcess getCurrentProcess()
com.ibm.dtfj.runtime.ManagedRuntime getCurrentRuntime()
com.ibm.dtfj.java.JavaRuntime getCurrentJavaRuntime()
java.lang.String getCurrentRuntimeID()
IAnalyzerContext getAnalyzerForRuntimeID(java.lang.String ID)
ID
- the context ID
java.lang.String getCurrentDumpName()
IAnalyzerBase loadAnalyzer(java.lang.String analyzerName)
analyzerName
- - analyzer to load
IAnalyzerBase loadAnalyzer(java.lang.String analyzerName, java.lang.Object parent)
analyzerName
- - analyzer to loadparent
- - parent analyzer
java.lang.String[] doAnalysis(java.lang.String analyzerName)
analyzerName
- - analyzer to operate on
int analyzeResponse(java.lang.String analyzerName, java.lang.String[] response, java.lang.String rule)
analyzerName
- - analyzer to operate onresponse
- - the set of strings which was produced by running this analyzerrule
- - the rule we want to evaluate
java.lang.String[] listRules(java.lang.String analyzerName)
analyzerName
- - analyzer to operate on
IAnalysisReport produceReport(java.lang.String analyzerName, java.lang.String[] response, java.lang.String rule, int state)
analyzerName
- - the name of the analyzerresponse
- - the set of strings which was produced by running this analyzerrule
- - the rule which the which was produced by running this analyzerstate
- - the value returned from analyzeResponse.
IAnalysisReport produceReport(java.lang.String analyzerName)
analyzerName
- - the name of the analyzer
void outputMessage(java.lang.String msg)
msg
- - the message that is to be output to the 'console'java.util.logging.Logger getLogger()
IAnalysisReport allocateReport(java.lang.String name, java.lang.String version)
name
- version
-
IAnalysisReport allocateReport(java.lang.String name, java.lang.String version, java.lang.Object refKey)
name
- version
- refKey
-
void setContextAttribute(int precedence, java.lang.String tag)
precedence
- an integer representing the order in which multiple attributes should
be considered when making decisions based on multiple attributestag
- a string representing the value of the attribute to addjava.util.List getContextAttributes()
setContextAttribute(int, String)
.
The elements in this list will be ordered according to the precedence specified in the calls
to setContextAttribute().
RuntimeParameters getRuntimeParameters()
void notifyAnalysisPhase(IAnalyzerBase analyzer, int phase, int target)
analyzer
- the current analyzerphase
- the analysis phase which will be analyzer dependenttarget
- the analysis phase at the end of the analysisboolean notifyAnalysisProgress(IAnalyzerBase analyzer, int progress, int target)
analyzer
- the current analyzerprogress
- the progress of the analysis phase which will be analyzer dependenttarget
- the expected value of the progress counter at the end of the analysis phase.
this may be 0 if the analyzer cannot cheaply calculate it.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |