Package org.springframework.transaction.event

# Interface TransactionalApplicationListener.SynchronizationCallback

Enclosing interface:
  TransactionalApplicationListener<E extends org.springframework.context.ApplicationEvent>

public static interface TransactionalApplicationListener.SynchronizationCallback
Callback to be invoked on synchronization-driven event processing, wrapping the target listener invocation (`TransactionalApplicationListener.processEvent(E)`).

See Also:
  - `TransactionalApplicationListener.addCallback(org.springframework.transaction.event.TransactionalApplicationListener.SynchronizationCallback)`
  - `TransactionalApplicationListener.processEvent(E)`

## Method Summary

Modifier and Type
Method
Description
`default void`
`postProcessEvent(org.springframework.context.ApplicationEvent event, Throwable ex)`
Called after a transactional event listener invocation.
`default void`
`preProcessEvent(org.springframework.context.ApplicationEvent event)`
Called before transactional event listener invocation.

## Method Details

### preProcessEvent

default void preProcessEvent(org.springframework.context.ApplicationEvent event)
Called before transactional event listener invocation.

Parameters:
  `event` - the event that transaction synchronization is about to process

### postProcessEvent

default void postProcessEvent(org.springframework.context.ApplicationEvent event, @Nullable Throwable ex)
Called after a transactional event listener invocation.

Parameters:
  `event` - the event that transaction synchronization finished processing
  `ex` - an exception that occurred during listener invocation, if any