接口 GenericApplicationListener
- 所有已知实现类:
ApplicationListenerMethodAdapter
,GenericApplicationListenerAdapter
,SourceFilteringListener
public interface GenericApplicationListener extends ApplicationListener<ApplicationEvent>, Ordered
Extended variant of the standardApplicationListener
interface, exposing further metadata such as the supported event and source type.As of Spring Framework 4.2, this interface supersedes the Class-based
SmartApplicationListener
with full handling of generic event types.- 从以下版本开始:
- 4.2
- 作者:
- Stephane Nicoll
- 另请参阅:
SmartApplicationListener
,GenericApplicationListenerAdapter
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 boolean
supportsEventType(ResolvableType eventType)
Determine whether this listener actually supports the given event type.boolean
supportsSourceType(Class<?> sourceType)
Determine whether this listener actually supports the given source type.从接口继承的方法 org.springframework.context.ApplicationListener
onApplicationEvent
方法详细资料
supportsEventType
boolean supportsEventType(ResolvableType eventType)
Determine whether this listener actually supports the given event type.- 参数:
eventType
- the event type (nevernull
)
supportsSourceType
boolean supportsSourceType(Class<?> sourceType)
Determine whether this listener actually supports the given source type.- 参数:
sourceType
- the source type, ornull
if no source