org.springframework.context

Interface ApplicationEventPublisher

    • Method Detail

      • publishEvent

        default void publishEvent(ApplicationEvent event)
        Notify all matching listeners registered with this application of an application event. Events may be framework events (such as RequestHandledEvent) or application-specific events.
        Parameters:
        event - the event to publish
        See Also:
        RequestHandledEvent
      • publishEvent

        void publishEvent(java.lang.Object event)
        Notify all matching listeners registered with this application of an event.

        If the specified event is not an ApplicationEvent, it is wrapped in a PayloadApplicationEvent.

        Parameters:
        event - the event to publish
        Since:
        4.2
        See Also:
        PayloadApplicationEvent