ApplicationEventBus constructor
ApplicationEventBus()
Defines the contract for an event multicaster that manages the registration,
removal, and dispatching of ApplicationEvent
s to ApplicationListener
s.
Implementations of this interface are responsible for:
- Keeping track of registered listeners and listener pods (by name).
- Notifying the appropriate listeners when an event is published.
- Supporting listener removal by predicate or name.
Example Usage
final multicaster = MyApplicationEventMulticaster();
multicaster.addApplicationListener(MyCustomListener());
multicaster.addApplicationListenerPod('loggingListener');
multicaster.multicastEvent(SomeCustomEvent());
multicaster.removeApplicationListeners((listener) => listener is MyCustomListener);
This interface is typically implemented within the JetLeaf application context to provide event publication support across the system.
Implementation
ApplicationEventBus();