Interface CommandContextCloseListener
-
- All Known Subinterfaces:
EventFlusher
- All Known Implementing Classes:
AbstractEventFlusher,AsyncJobAddedNotification,DatabaseEventFlusher,FailedJobListener,TransactionCommandContextCloseListener,VerifyDeserializedObjectCommandContextCloseListener
@Internal public interface CommandContextCloseListener
A listener that can be used to be notified of lifecycle events of theCommandContext.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterSessionsFlush(CommandContext commandContext)Called when theSessionhave been successfully flushed.voidclosed(CommandContext commandContext)Called when theCommandContextis successfully closed.voidcloseFailure(CommandContext commandContext)Called when theCommandContexthas not been successully closed due to an exception that happened.voidclosing(CommandContext commandContext)Called when theCommandContextis being closed, but no 'close logic' has been executed.
-
-
-
Method Detail
-
closing
void closing(CommandContext commandContext)
Called when theCommandContextis being closed, but no 'close logic' has been executed. At this point, theTransactionContext(if applicable) has not yet been committed/rolledback and none of theSessioninstances have been flushed. If an exception happens and it is not caught in this method: - TheSessioninstances will *not* be flushed - TheTransactionContextwill be rolled back (if applicable)
-
afterSessionsFlush
void afterSessionsFlush(CommandContext commandContext)
Called when theSessionhave been successfully flushed. When an exception happened during the flushing of the sessions, this method will not be called. If an exception happens and it is not caught in this method: - TheSessioninstances will *not* be flushed - TheTransactionContextwill be rolled back (if applicable)
-
closed
void closed(CommandContext commandContext)
Called when theCommandContextis successfully closed. At this point, theTransactionContext(if applicable) has been successfully committed and no rollback has happened. AllSessioninstances have been closed. Note that throwing an exception here does *not* affect the transaction. TheCommandContextwill log the exception though.
-
closeFailure
void closeFailure(CommandContext commandContext)
Called when theCommandContexthas not been successully closed due to an exception that happened. Note that throwing an exception here does *not* affect the transaction. TheCommandContextwill log the exception though.
-
-