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:
Serializable, EventManager

public class TransactionEventManager
extends 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
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
_listeners
 
Constructor Summary
TransactionEventManager()
           
 
Method Summary
 void addListener(Object listener)
          Register an event listener.
protected  void fireEvent(Object event, 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(Object listener)
          Remove an event 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(Object listener)
Description copied from class: AbstractConcurrentEventManager
Register an event listener.

Specified by:
addListener in interface EventManager
Overrides:
addListener in class AbstractConcurrentEventManager

removeListener

public boolean removeListener(Object listener)
Description copied from class: AbstractConcurrentEventManager
Remove an event listener.

Specified by:
removeListener in interface EventManager
Overrides:
removeListener in class 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(Object event,
                         Object listener)
Fire the given event to all registered listeners.

Specified by:
fireEvent in class AbstractConcurrentEventManager


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.