org.jboss.webbeans.event
Class DeferredEventNotification<T>

java.lang.Object
  extended by org.jboss.webbeans.event.DeferredEventNotification<T>
All Implemented Interfaces:
javax.transaction.Synchronization

public class DeferredEventNotification<T>
extends java.lang.Object
implements javax.transaction.Synchronization

A synchronization object which will deliver the event to the observer after the JTA transaction currently in effect is committed.

Author:
David Allen
See Also:
Synchronization

Constructor Summary
DeferredEventNotification(T event, Observer<T> observer)
          Creates a new deferred event notifier.
 
Method Summary
 void afterCompletion(int status)
          Called after completion of a transaction Checks if the observer is interested in this particular transaction phase and if so, notifies the observer.
 void beforeCompletion()
          Called before completion of a transaction Checks if the observer is interested in this particular transaction phase and if so, notifies the observer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeferredEventNotification

public DeferredEventNotification(T event,
                                 Observer<T> observer)
Creates a new deferred event notifier.

Parameters:
observer - The observer to be notified
event - The event being fired
Method Detail

afterCompletion

public void afterCompletion(int status)
Called after completion of a transaction Checks if the observer is interested in this particular transaction phase and if so, notifies the observer.

Specified by:
afterCompletion in interface javax.transaction.Synchronization
Parameters:
status - The status of the transaction
See Also:
Status

beforeCompletion

public void beforeCompletion()
Called before completion of a transaction Checks if the observer is interested in this particular transaction phase and if so, notifies the observer.

Specified by:
beforeCompletion in interface javax.transaction.Synchronization


Copyright © 2008. All Rights Reserved.