Package org.nuxeo.ecm.core.event.stream
Class DomainEventProducerListener
java.lang.Object
org.nuxeo.ecm.core.event.stream.DomainEventProducerListener
- All Implemented Interfaces:
javax.transaction.Synchronization
,EventListener
public class DomainEventProducerListener
extends Object
implements EventListener, javax.transaction.Synchronization
Dispatches core events to domain event producers.
- Since:
- 11.4
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final ThreadLocal<Boolean>
protected static final ThreadLocal<List<DomainEventProducer>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCompletion
(int status) void
protected void
void
handleEvent
(Event event) Handle the given event.protected void
protected void
protected boolean
registerSynchronization
(javax.transaction.Synchronization sync)
-
Field Details
-
isEnlisted
-
producers
-
-
Constructor Details
-
DomainEventProducerListener
public DomainEventProducerListener()
-
-
Method Details
-
handleEvent
Description copied from interface:EventListener
Handle the given event. The listener can cancel the event by callingEvent.cancel()
- Specified by:
handleEvent
in interfaceEventListener
- Parameters:
event
- the event
-
initDomainEventProducers
protected void initDomainEventProducers() -
cleanDomainEventProducers
protected void cleanDomainEventProducers() -
beforeCompletion
public void beforeCompletion()- Specified by:
beforeCompletion
in interfacejavax.transaction.Synchronization
-
afterCompletion
public void afterCompletion(int status) - Specified by:
afterCompletion
in interfacejavax.transaction.Synchronization
-
produceDomainEvents
protected void produceDomainEvents() -
registerSynchronization
protected boolean registerSynchronization(javax.transaction.Synchronization sync) throws javax.transaction.RollbackException - Throws:
javax.transaction.RollbackException
-