Dump Analyzer Interfaces

There are very few interfaces involved in writing an analyzer module. These are explained briefly below:-

com.ibm.dtfj.analyzer.ext.IAnalyzerBase

All analyzers must implement this interface. The interface defines a few common attributes that all analyzers should have and methods to access them.

com.ibm.dtfj.analyzer.ext.IAnalyze

An analyzer should implement this interface if it is intended to do some analysis on the dump and reach a conclusion based on this. The analyzer is made up of a set of 1 or more user defined rules and some analysis that produces output in the form of name=value pairs. The output is then compared to the rules to reach a conclusion. The analysis is split into phases so that a controlling environment (e.g. a script or other analyzer) can make some decisions as the analysis is proceeding. These phases are:-

com.ibm.dtfj.analyzer.ext.IReport

An analyzer can implement this interface to produce a human readable report of the key information it has generated. It may contain facts about the dump and/or problems it has found. The report is designed to make it simple to produce final output in a variety of formats such as HTML, XML, raw text etc.

com.ibm.dtfj.analyzer.base.AnalyzerBase

To simplify the task of implementing an analyzer this abstract base class provides default implementations of most of the methods of IAnalyzerBase. You will need to provide an implementation of getShortDescription and may want to override getVersion and isPrimaryAnalyzer. It also provides some helpful utility methods which are designed to simplify the implementation of the IAnalyze interface.

com.ibm.dtfj.analyzer.ext.IAnalyzerContext

This interface defines common functions that are provided by the tool's infrastructure, that all analyzers can take advantage of. These include the ability to obtain the Java™ Runtime during analysis. Each analyzer accesses these functions through the context object returned by the getContext() method in IAnalyzerBase.

com.ibm.dtfj.analyzer.ext.IAnalysisReport

This interface defines report creation capabilities that allow an analyzer to generate output that can easily be transformed into many different formats. There are many methods provided but a few examples should give a flavour of the capabilities.



For the javadoc of the analyzer interfaces see (javadoc).

© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.