|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.unitofwork.UnitOfWorkListenerAdapter
public abstract class UnitOfWorkListenerAdapter
Abstract implementation of the UnitOfWorkListener that provides empty implementation of all methods declared
in UnitOfWorkListener. This implementation does nothing.
| Constructor Summary | |
|---|---|
UnitOfWorkListenerAdapter()
|
|
| Method Summary | ||
|---|---|---|
void |
afterCommit(UnitOfWork unitOfWork)
Invoked when the UnitOfWork is committed. |
|
void |
onCleanup(UnitOfWork unitOfWork)
Notifies listeners that the UnitOfWork is being cleaned up. |
|
|
onEventRegistered(UnitOfWork unitOfWork,
EventMessage<T> event)
Invoked when an Event is registered for publication when the UnitOfWork is committed. |
|
void |
onPrepareCommit(UnitOfWork unitOfWork,
Set<AggregateRoot> aggregateRoots,
List<EventMessage> events)
Invoked before aggregates are committed, and before any events are published. |
|
void |
onPrepareTransactionCommit(UnitOfWork unitOfWork,
Object transaction)
Invoked before the transaction bound to this Unit of Work is committed, but after all other commit activities (publication of events and saving of aggregates) are performed. |
|
void |
onRollback(UnitOfWork unitOfWork,
Throwable failureCause)
Invoked when the UnitOfWork is rolled back. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnitOfWorkListenerAdapter()
| Method Detail |
|---|
public <T> EventMessage<T> onEventRegistered(UnitOfWork unitOfWork,
EventMessage<T> event)
event.
onEventRegistered in interface UnitOfWorkListenerT - The type of payload of the EventMessageunitOfWork - The Unit of Work on which an event is registeredevent - The event about to be registered for publication
public void onPrepareCommit(UnitOfWork unitOfWork,
Set<AggregateRoot> aggregateRoots,
List<EventMessage> events)
events may not contain the uncommitted domain events of each of the
aggregateRoots. To retrieve all events, collect all uncommitted events from the aggregate roots and
combine them with the list of events.
onPrepareCommit in interface UnitOfWorkListenerunitOfWork - The Unit of Work being committedaggregateRoots - the aggregate roots being committedevents - Events that have been registered for dispatching with the UnitOfWork
public void onPrepareTransactionCommit(UnitOfWork unitOfWork,
Object transaction)
UnitOfWorkListener
onPrepareTransactionCommit in interface UnitOfWorkListenerunitOfWork - The Unit of Work of which the underlying transaction is being committed.transaction - The object representing the (status of) the transaction, as returned by TransactionManager.startTransaction().TransactionManagerpublic void afterCommit(UnitOfWork unitOfWork)
UnitOfWorkListener.onRollback(UnitOfWork, Throwable) consecutively.
afterCommit in interface UnitOfWorkListenerunitOfWork - The Unit of Work being committedUnitOfWork.commit()
public void onRollback(UnitOfWork unitOfWork,
Throwable failureCause)
onRollback in interface UnitOfWorkListenerfailureCause - unitOfWork - The Unit of Work being rolled backUnitOfWork.rollback(Throwable)public void onCleanup(UnitOfWork unitOfWork)
onCleanup in interface UnitOfWorkListenerunitOfWork - The Unit of Work being cleaned up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||