Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.listener
Class TransactedEventServiceImpl

java.lang.Object
  extended by org.nuxeo.ecm.core.listener.TransactedEventServiceImpl
All Implemented Interfaces:
EventTransactionListener, TransactedEventService

public class TransactedEventServiceImpl
extends Object
implements TransactedEventService, EventTransactionListener

This class handle the difference between operations (used by apogee) and core events.

When an event is raised within an operation it will be ignored (since the operation contains all the information about the modifications that were done by the operation).

If there is any active operation then events will be stacked until commit is done.

When in an operation context the operations will be stacked until commit is done. (events are ignored) Most of the time there will be any one operation stacked (the root one) - this depends on whether child operation notifications are blocked or not. See Operation.BLOCK_CHILD_NOTIFICATIONS

Author:
Bogdan Stefanescu

Constructor Summary
TransactedEventServiceImpl()
           
 
Method Summary
 void addListener(TransactedListener listener)
           
 void record(Object event)
           
 void recordEvent(CoreEvent event)
           
 void recordOperation(Operation<?> event)
           
 void removeListener(TransactedListener listener)
           
 void transactionCommitted()
          Invoked multiple time when the transaction is committing, one for each session supported by the transaction.
 void transactionRollbacked()
          Invoked multiple time when the transaction is roll-backing, one for each session supported by the transaction.
 void transactionStarted()
          Invoked multiple time each time a session is created inside a transaction.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactedEventServiceImpl

public TransactedEventServiceImpl()
Method Detail

addListener

public void addListener(TransactedListener listener)
Specified by:
addListener in interface TransactedEventService

removeListener

public void removeListener(TransactedListener listener)
Specified by:
removeListener in interface TransactedEventService

record

public void record(Object event)
Specified by:
record in interface TransactedEventService

recordEvent

public void recordEvent(CoreEvent event)
Specified by:
recordEvent in interface TransactedEventService

recordOperation

public void recordOperation(Operation<?> event)
Specified by:
recordOperation in interface TransactedEventService

transactionStarted

public void transactionStarted()
Description copied from interface: EventTransactionListener
Invoked multiple time each time a session is created inside a transaction.

Specified by:
transactionStarted in interface EventTransactionListener
Specified by:
transactionStarted in interface TransactedEventService

transactionCommitted

public void transactionCommitted()
Description copied from interface: EventTransactionListener
Invoked multiple time when the transaction is committing, one for each session supported by the transaction.

Specified by:
transactionCommitted in interface EventTransactionListener
Specified by:
transactionCommitted in interface TransactedEventService

transactionRollbacked

public void transactionRollbacked()
Description copied from interface: EventTransactionListener
Invoked multiple time when the transaction is roll-backing, one for each session supported by the transaction.

Specified by:
transactionRollbacked in interface EventTransactionListener
Specified by:
transactionRollbacked in interface TransactedEventService

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.