com.ibm.dtfj.analyzer.helpers
Class AllJavaMonitors

java.lang.Object
  extended by TranslatableAnalyzer
      extended by com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
          extended by com.ibm.dtfj.analyzer.helpers.AllJavaMonitors
All Implemented Interfaces:
IAnalyzerBase, IReport, IWrapper

public class AllJavaMonitors
extends SimpleAnalyzerBean

Print and query the list of all JavaMonitor objects within a DTFJ JavaRuntime
Cross-reference against the list of JavaThreads to determine which JavaMonitors are currently owned or waited on by various JavaThreads


Constructor Summary
AllJavaMonitors()
          Null constructor for use as JavaBean
 
Method Summary
 com.ibm.dtfj.java.JavaMonitor getBlockedOnMonitor(com.ibm.dtfj.java.JavaThread th)
          Find the monitor that a given java thread is currently blocked on
static AllJavaMonitors getInstance(IAnalyzerContext context, com.ibm.dtfj.java.JavaRuntime parent)
          Find the AllJavaMonitors bean instance associated with a given parent JavaRuntime (create it if necessary)
 java.util.Vector getOwnedMonitors(com.ibm.dtfj.java.JavaThread th)
          Find all the monitors owned by one java thread
 void initializeMonitorInfo()
          Setup information about all monitors currently owned or blocked on by all threads
 IAnalysisReport produceReport()
          Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter.
 void setParent(java.lang.Object parent)
          Set the parent JavaRuntime underlying this analyzer bean.
 
Methods inherited from class com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
allocateReport, allocateReportOptions, allocateSecondaryReport, getCachingPriority, getCategories, getContext, getIdentityString, getInstance, getLogger, getLongDescription, getName, getNextValidObject, getParent, getReportExtensionHelper, getResourceBundleName, getShortDescription, getVersion, isPrimaryAnalyzer, printEmbeddedReport, printEmbeddedReport, printEmbeddedReportWithOptions, printEmbeddedReportWithOptions, printReportInfoHeader, recordInternalExceptionStatic, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllJavaMonitors

public AllJavaMonitors()
Null constructor for use as JavaBean

Method Detail

getInstance

public static AllJavaMonitors getInstance(IAnalyzerContext context,
                                          com.ibm.dtfj.java.JavaRuntime parent)
Find the AllJavaMonitors bean instance associated with a given parent JavaRuntime (create it if necessary)

Parameters:
context - the AnalyzerContext in which to locate this bean instance
parent - the parent JavaRuntime underlying this analyzer bean
Returns:
the desired AllJavaMonitors analyzer bean

setParent

public void setParent(java.lang.Object parent)
Set the parent JavaRuntime underlying this analyzer bean.

Specified by:
setParent in interface IWrapper
Overrides:
setParent in class SimpleAnalyzerBean
Parameters:
parent - The parent object to set. Must be of type JavaRuntime. compatible with the type of analyzer bean that receives it
See Also:
IWrapper.setParent(java.lang.Object)

initializeMonitorInfo

public void initializeMonitorInfo()
Setup information about all monitors currently owned or blocked on by all threads


getOwnedMonitors

public java.util.Vector getOwnedMonitors(com.ibm.dtfj.java.JavaThread th)
                                  throws com.ibm.dtfj.image.DTFJException
Find all the monitors owned by one java thread

Parameters:
th - JavaThread for which we want to find owned monitors
Returns:
a Vector listing all the JavaMonitors owned by this JavaThread, or null
Throws:
com.ibm.dtfj.image.DTFJException

getBlockedOnMonitor

public com.ibm.dtfj.java.JavaMonitor getBlockedOnMonitor(com.ibm.dtfj.java.JavaThread th)
                                                  throws com.ibm.dtfj.image.DTFJException
Find the monitor that a given java thread is currently blocked on

Parameters:
th - JavaThread for which we want to find the monitor
Returns:
a JavaMonitor currently that this thread is currently blocked on, or null
Throws:
com.ibm.dtfj.image.DTFJException

produceReport

public IAnalysisReport produceReport()
Description copied from interface: IReport
Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter.

Specified by:
produceReport in interface IReport
Overrides:
produceReport in class SimpleAnalyzerBean
Returns:
- the generic report object which will be given to some formatter
See Also:
IReport.produceReport()


© 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.