接口 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 String
    Return an optional identifier for the listener.
    default int
    Determine this listener's order in a set of listeners for the same event.
    boolean
    Determine whether this listener actually supports the given event type.
    default boolean
    supportsSourceType(Class<?> sourceType)
    Determine whether this listener actually supports the given source type.

    从接口继承的方法 cn.taketoday.context.ApplicationListener

    onApplicationEvent
  • 方法详细资料

    • supportsEventType

      boolean supportsEventType(Class<? extends ApplicationEvent> eventType)
      Determine whether this listener actually supports the given event type.
      参数:
      eventType - the event type (never null)
    • supportsSourceType

      default boolean supportsSourceType(@Nullable Class<?> sourceType)
      Determine whether this listener actually supports the given source type.

      The default implementation always returns true.

      参数:
      sourceType - the source type, or null if 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

      default String getListenerId()
      Return an optional identifier for the listener.

      The default value is an empty String.

      另请参阅: