接口 SmartApplicationListener
- 所有已知实现类:
DefaultSimpUserRegistry
,GenericApplicationListenerAdapter
,MultiServerUserRegistry
,SourceFilteringListener
public interface SmartApplicationListener extends ApplicationListener<ApplicationEvent>, Ordered
Extended variant of the standardApplicationListener
interface, exposing further metadata such as the supported event and source type.For full introspection of generic event types, consider implementing the
GenericApplicationListener
interface instead.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
- 另请参阅:
GenericApplicationListener
,GenericApplicationListenerAdapter
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 boolean
supportsEventType(Class<? extends ApplicationEvent> 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(Class<? extends ApplicationEvent> 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