Interface ApplicationEventPublisher<T>

    • Method Detail

      • publishEvent

        void publishEvent​(@NonNull
                          T event)
        Publish the given event. The event will be published synchronously and only return once all listeners have consumed the event.
        Parameters:
        event - The event to publish
      • publishEventAsync

        @NonNull
        default java.util.concurrent.Future<java.lang.Void> publishEventAsync​(@NonNull
                                                                              T event)
        Publish the given event. The event will be published asynchronously. A future is returned that can be used to check whether the event completed successfully or not.
        Parameters:
        event - The event to publish
        Returns:
        A future that completes when the event is published
        Since:
        1.3.5