T - The event typepublic interface ApplicationEventPublisher<T>
Interface for classes that publish events received by ApplicationEventListener instances.
Note that this interface is designed for application level, non-blocking synchronous events for decoupling code and is not a replacement for a messaging system
| Modifier and Type | Field and Description | 
|---|---|
static ApplicationEventPublisher<?> | 
NO_OP  | 
| Modifier and Type | Method and Description | 
|---|---|
static <K> ApplicationEventPublisher<K> | 
noOp()
Returns a no-op instance of  
ApplicationEventPublisher. | 
void | 
publishEvent(T event)
Publish the given event. 
 | 
default Future<Void> | 
publishEventAsync(T event)
Publish the given event. 
 | 
static final ApplicationEventPublisher<?> NO_OP
static <K> ApplicationEventPublisher<K> noOp()
ApplicationEventPublisher.K - The event typeApplicationEventPublishervoid publishEvent(@NonNull T event)
event - The event to publish@NonNull default Future<Void> publishEventAsync(@NonNull T event)
event - The event to publish