List of usage examples for org.springframework.context ApplicationListener equals
public boolean equals(Object obj)
From source file:org.mule.module.spring.events.MuleEventMulticaster.java
/** * Removes a listener from the multicaster * * @param listener the listener to remove *//*from w w w.ja v a 2 s .c om*/ public void removeApplicationListener(ApplicationListener listener) { for (Iterator iterator = listeners.iterator(); iterator.hasNext();) { ApplicationListener applicationListener = (ApplicationListener) iterator.next(); if (applicationListener instanceof AsynchronousEventListener) { if (((AsynchronousEventListener) applicationListener).getListener().equals(listener)) { listeners.remove(applicationListener); return; } } else { if (applicationListener.equals(listener)) { listeners.remove(applicationListener); return; } } } listeners.remove(listener); }