Package org.springframework.context
Interface ApplicationListener<E extends ApplicationEvent>
- Type Parameters:
E
- the specific ApplicationEvent subclass to listen to
- All Superinterfaces:
EventListener
- All Known Subinterfaces:
GenericApplicationListener
,SmartApplicationListener
- All Known Implementing Classes:
ApplicationListenerMethodAdapter
,DefaultSimpUserRegistry
,DispatcherPortlet
,FrameworkPortlet
,GenericApplicationListenerAdapter
,JmsListenerEndpointRegistry
,MultiServerUserRegistry
,ResourceUrlProvider
,ScheduledAnnotationBeanPostProcessor
,SourceFilteringListener
,UserRegistryMessageHandler
public interface ApplicationListener<E extends ApplicationEvent> extends EventListener
Interface to be implemented by application event listeners. Based on the standardjava.util.EventListener
interface for the Observer design pattern.As of Spring 3.0, an ApplicationListener can generically declare the event type that it is interested in. When registered with a Spring ApplicationContext, events will be filtered accordingly, with the listener getting invoked for matching event objects only.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
ApplicationEventMulticaster
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onApplicationEvent(E event)
Handle an application event.
Method Detail
onApplicationEvent
void onApplicationEvent(E event)
Handle an application event.- Parameters:
event
- the event to respond to