reintroduced "removeAllListeners()" method since Spring DM uses it
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@961 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
f899a72e1c
commit
2986c24bf6
|
|
@ -68,6 +68,11 @@ public abstract class AbstractApplicationEventMulticaster
|
|||
this.defaultRetriever.applicationListenerBeans.add(listenerBeanName);
|
||||
}
|
||||
|
||||
public void removeAllListeners() {
|
||||
this.defaultRetriever.applicationListeners.clear();
|
||||
this.defaultRetriever.applicationListenerBeans.clear();
|
||||
}
|
||||
|
||||
public final void setBeanFactory(BeanFactory beanFactory) {
|
||||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@ public interface ApplicationEventMulticaster {
|
|||
*/
|
||||
void addApplicationListenerBean(String listenerBeanName);
|
||||
|
||||
/**
|
||||
* Remove all listeners registered with this multicaster.
|
||||
* <p>After a remove call, the multicaster will perform no action
|
||||
* on event notification until new listeners are being registered.
|
||||
*/
|
||||
void removeAllListeners();
|
||||
|
||||
/**
|
||||
* Multicast the given application event to appropriate listeners.
|
||||
* @param event the event to multicast
|
||||
|
|
|
|||
Loading…
Reference in New Issue