reintroduced "removeAllListeners()" method since Spring DM uses it

master
Juergen Hoeller 16 years ago
parent 707d2ed72a
commit 73dd6c28a3
  1. 5
      org.springframework.context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java
  2. 7
      org.springframework.context/src/main/java/org/springframework/context/event/ApplicationEventMulticaster.java

@ -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…
Cancel
Save