public interface ApplicationEventPublisher
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 | Method and Description |
---|---|
void |
publishEvent(java.lang.Object event)
Publish the given event.
|
default java.util.concurrent.Future<java.lang.Void> |
publishEventAsync(java.lang.Object event)
Publish the given event.
|
void publishEvent(@NonNull java.lang.Object event)
event
- The event to publish@NonNull default java.util.concurrent.Future<java.lang.Void> publishEventAsync(@NonNull java.lang.Object event)
event
- The event to publish