org.sourceforge.jemm.client
Class MethodContextTracker

java.lang.Object
  extended by org.sourceforge.jemm.client.MethodContextTracker
All Implemented Interfaces:
MethodListener

public class MethodContextTracker
extends java.lang.Object
implements MethodListener

A MethodListener which converts the calls into more context aware calls. Specifically this takes account of when entities are entered and exited by all threads, such that the logic can differ for entry and exit depending on whether a method or entity is currently in use.

Author:
Paul

Constructor Summary
MethodContextTracker(StackTracer tracer, LockTracer lockTracer)
           
 
Method Summary
 void beginLock(LockEvent e)
          Acquires a synchronisation lock on an object.
 void endLock(LockEvent e)
          Releases a synchronisation lock on an object.
 void entityEntered(MethodEvent e)
          Called when an Object is entered.
 void entityExited(MethodEvent e)
          Called when an Object is exited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodContextTracker

public MethodContextTracker(StackTracer tracer,
                            LockTracer lockTracer)
Method Detail

entityEntered

public void entityEntered(MethodEvent e)
Description copied from interface: MethodListener
Called when an Object is entered.

Specified by:
entityEntered in interface MethodListener
Parameters:
e - The event

entityExited

public void entityExited(MethodEvent e)
Description copied from interface: MethodListener
Called when an Object is exited

Specified by:
entityExited in interface MethodListener
Parameters:
e - The event

beginLock

public void beginLock(LockEvent e)
Description copied from interface: MethodListener
Acquires a synchronisation lock on an object.

Specified by:
beginLock in interface MethodListener

endLock

public void endLock(LockEvent e)
Description copied from interface: MethodListener
Releases a synchronisation lock on an object.

Specified by:
endLock in interface MethodListener


Copyright © 2009. All Rights Reserved.