接口 SmartApplicationListener
- 所有超级接口:
ApplicationListener<ApplicationEvent>,EventListener,cn.taketoday.core.Ordered
- 所有已知子接口:
GenericApplicationListener
- 所有已知实现类:
ApplicationListenerMethodAdapter,GenericApplicationListenerAdapter,SourceFilteringListener
public interface SmartApplicationListener
extends ApplicationListener<ApplicationEvent>, cn.taketoday.core.Ordered
Extended variant of the standard
ApplicationListener 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.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
字段概要
从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
方法概要
修饰符和类型方法说明default StringReturn an optional identifier for the listener.default intgetOrder()Determine this listener's order in a set of listeners for the same event.booleansupportsEventType(Class<? extends ApplicationEvent> eventType) Determine whether this listener actually supports the given event type.default booleansupportsSourceType(Class<?> sourceType) Determine whether this listener actually supports the given source type.从接口继承的方法 cn.taketoday.context.ApplicationListener
onApplicationEvent
-
方法详细资料
-
supportsEventType
Determine whether this listener actually supports the given event type.- 参数:
eventType- the event type (nevernull)
-
supportsSourceType
Determine whether this listener actually supports the given source type.The default implementation always returns
true.- 参数:
sourceType- the source type, ornullif no source
-
getOrder
default int getOrder()Determine this listener's order in a set of listeners for the same event.The default implementation returns
Ordered.LOWEST_PRECEDENCE.- 指定者:
getOrder在接口中cn.taketoday.core.Ordered
-
getListenerId
Return an optional identifier for the listener.The default value is an empty String.
-