接口 ApplicationListener<E extends ApplicationEvent>
- 类型参数:
E
- the specificApplicationEvent
subclass to listen to
- 所有超级接口:
EventListener
- 所有已知实现类:
ApplicationListenerMethodAdapter
,DefaultSimpUserRegistry
,GenericApplicationListenerAdapter
,JmsListenerEndpointRegistry
,MultiServerUserRegistry
,ResourceUrlProvider
,ResourceUrlProvider
,ScheduledAnnotationBeanPostProcessor
,SourceFilteringListener
,UserRegistryMessageHandler
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ApplicationListener<E extends ApplicationEvent> extends EventListener
Interface to be implemented by application event listeners.Based on the standard
java.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 SpringApplicationContext
, events will be filtered accordingly, with the listener getting invoked for matching event objects only.- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
ApplicationEvent
,ApplicationEventMulticaster
,EventListener
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
onApplicationEvent(E event)
Handle an application event.
方法详细资料
onApplicationEvent
void onApplicationEvent(E event)
Handle an application event.- 参数:
event
- the event to respond to