org.apache.openjpa.event
Class TransactionEventManager

java.lang.Object
  extended by org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
      extended by org.apache.openjpa.event.TransactionEventManager
All Implemented Interfaces:
org.apache.openjpa.lib.util.EventManager

public class TransactionEventManager
extends org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager

Manager that can be used to track and notify transaction listeners of transaction-related events.

Since:
0.3.0
Author:
Patrick Linskey, Abe White

Field Summary
 
Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
_listeners
 
Constructor Summary
TransactionEventManager()
           
 
Method Summary
 void addListener(java.lang.Object listener)
           
protected  void fireEvent(java.lang.Object event, java.lang.Object listener)
          Fire the given event to all registered listeners.
 boolean hasBeginListeners()
          Whether there are any begin transaction listeners.
 boolean hasEndListeners()
          Whether there are any end transaction listeners.
 boolean hasFlushListeners()
          Whether there are any flush transaction listeners.
 boolean removeListener(java.lang.Object listener)
           
 
Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, setFailFast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionEventManager

public TransactionEventManager()
Method Detail

addListener

public void addListener(java.lang.Object listener)
Specified by:
addListener in interface org.apache.openjpa.lib.util.EventManager
Overrides:
addListener in class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager

removeListener

public boolean removeListener(java.lang.Object listener)
Specified by:
removeListener in interface org.apache.openjpa.lib.util.EventManager
Overrides:
removeListener in class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager

hasBeginListeners

public boolean hasBeginListeners()
Whether there are any begin transaction listeners.


hasFlushListeners

public boolean hasFlushListeners()
Whether there are any flush transaction listeners.


hasEndListeners

public boolean hasEndListeners()
Whether there are any end transaction listeners.


fireEvent

protected void fireEvent(java.lang.Object event,
                         java.lang.Object listener)
Fire the given event to all registered listeners.

Specified by:
fireEvent in class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager