org.jvnet.hk2.config
Class Transactions

java.lang.Object
  extended by org.jvnet.hk2.config.Transactions
All Implemented Interfaces:
org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy

@Service
@Scoped(value=org.jvnet.hk2.component.Singleton.class)
public final class Transactions
extends java.lang.Object
implements org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy

Transactions is a singleton service that receives transaction notifications and dispatch these notifications asynchronously to listeners.

Author:
Jerome Dochez

Nested Class Summary
 class Transactions.ConfigListenerJob
           
 class Transactions.ConfigListenerNotifier
          Configuration listener notification pump.
 class Transactions.ListenerNotifier<T,U,V>
          Default listener notification pump.
 
Constructor Summary
Transactions()
           
 
Method Summary
 void addTransactionsListener(TransactionListener listener)
          add a new listener to all transaction events.
 java.util.List<TransactionListener> currentListeners()
           
 void postConstruct()
           
 void preDestroy()
           
 boolean removeTransactionsListener(TransactionListener listener)
          Removes an existing listener for transaction events
 void waitForDrain()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transactions

public Transactions()
Method Detail

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct

preDestroy

public void preDestroy()
Specified by:
preDestroy in interface org.jvnet.hk2.component.PreDestroy

addTransactionsListener

public void addTransactionsListener(TransactionListener listener)
add a new listener to all transaction events.

Parameters:
listener - to be added.

removeTransactionsListener

public boolean removeTransactionsListener(TransactionListener listener)
Removes an existing listener for transaction events

Parameters:
listener - the registered listener
Returns:
true if the listener unregistration was successful

currentListeners

public java.util.List<TransactionListener> currentListeners()

waitForDrain

public void waitForDrain()


Copyright © 2010 Sun Microsystems, Inc.. All Rights Reserved.