ApplicationListener objects and publish events to them.
An org., typically
a Spring org., can use an
ApplicationEventMulticaster as a delegate for actually publishing events.
ApplicationListener
| Modifier and Type | Method and Description |
|---|---|
| public void | addApplicationListener(ApplicationListener<?>
the listener to add listener)Add a listener to be notified of all events. |
| public void | addApplicationListenerBean(String
the name of the listener bean to add listenerBeanName)Add a listener bean to be notified of all events. |
| public void | multicastEvent(ApplicationEvent
the event to multicast event)Multicast the given application event to appropriate listeners. |
| public void | multicastEvent(ApplicationEvent
the event to multicast event, ResolvableType the type of event (can be eventType)null)Multicast the given application event to appropriate listeners. |
| public void | |
| public void | removeApplicationListener(ApplicationListener<?>
the listener to remove listener)Remove a listener from the notification list. |
| public void | removeApplicationListenerBean(String
the name of the listener bean to remove listenerBeanName)Remove a listener bean from the notification list. |
| public void | removeApplicationListenerBeans(Predicate<String>
the predicate to identify listener bean names to remove predicate)Remove all matching listener beans from the set of registered
listener bean names (referring to bean classes which in turn
implement the |
| public void | removeApplicationListeners(Predicate<ApplicationListener<?>>
the predicate to identify listener instances to remove,
e.g. checking predicate)SmartApplicationListener#getListenerId()Remove all matching listeners from the set of registered
|
| addApplicationListener | back to summary |
|---|---|
| public void addApplicationListener(ApplicationListener<?> listener) Add a listener to be notified of all events.
| |
| addApplicationListenerBean | back to summary |
|---|---|
| public void addApplicationListenerBean(String listenerBeanName) Add a listener bean to be notified of all events.
| |
| multicastEvent | back to summary |
|---|---|
| public void multicastEvent(ApplicationEvent event) Multicast the given application event to appropriate listeners. Consider using If a matching
| |
| multicastEvent | back to summary |
|---|---|
| public void multicastEvent(ApplicationEvent event, ResolvableType eventType) Multicast the given application event to appropriate listeners. If the If a matching
| |
| removeAllListeners | back to summary |
|---|---|
| public 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. | |
| removeApplicationListener | back to summary |
|---|---|
| public void removeApplicationListener(ApplicationListener<?> listener) Remove a listener from the notification list.
| |
| removeApplicationListenerBean | back to summary |
|---|---|
| public void removeApplicationListenerBean(String listenerBeanName) Remove a listener bean from the notification list.
| |
| removeApplicationListenerBeans | back to summary |
|---|---|
| public void removeApplicationListenerBeans(Predicate<String> predicate) Remove all matching listener beans from the set of registered
listener bean names (referring to bean classes which in turn
implement the Note This just applies to bean name registrations, not to
programmatically registered
| |
| removeApplicationListeners | back to summary |
|---|---|
| public void removeApplicationListeners(Predicate<ApplicationListener<?>> predicate) Remove all matching listeners from the set of registered
Note This just applies to instance registrations, not to listeners registered by bean name.
| |