接口 EventPublisherContext

    • 方法详细资料

      • getApplicationListener

        List<ApplicationListener> getApplicationListener​(String eventName)
        Add a listener to be notified of all events.
        参数:
        eventName - the listener to add
      • addApplicationListener

        void addApplicationListener​(String eventName,
                                    ApplicationListener listener)
        Add a listener to be notified of all events.
        参数:
        listener - the listener to add
        eventName - the listener to add
      • removeApplicationListener

        void removeApplicationListener​(String eventName)
        Remove a listener from the notification list.
        参数:
        eventName - the listener to remove
      • removeAllListeners

        void removeAllListeners()
        Remove all listeners registered with this multicaster.

        After a remove call, the multicaster will perform no action on event notification until new listeners are registered.

      • publisherEvent

        void publisherEvent​(ApplicationEvent event)
        Multicast the given application event to appropriate listeners. if possible as it provides better support for generics-based events.
        参数:
        event - the event to multicast