类 GenericApplicationListenerAdapter
java.lang.Object
cn.taketoday.context.event.GenericApplicationListenerAdapter
- 所有已实现的接口:
ApplicationListener<ApplicationEvent>,GenericApplicationListener,SmartApplicationListener,cn.taketoday.core.Ordered,EventListener
GenericApplicationListener adapter that determines supported event types
through introspecting the generically declared type of the target listener.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Stephane Nicoll
- 另请参阅:
-
字段概要
从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器构造器说明Create a new GenericApplicationListener for the given delegate. -
方法概要
修饰符和类型方法说明Return an optional identifier for the listener.intgetOrder()Determine this listener's order in a set of listeners for the same event.voidHandle an application event.booleansupportsEventType(cn.taketoday.core.ResolvableType eventType) Determine whether this listener actually supports the given event type.booleansupportsSourceType(Class<?> sourceType) Determine whether this listener actually supports the given source type.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.context.event.GenericApplicationListener
supportsEventType
-
构造器详细资料
-
GenericApplicationListenerAdapter
Create a new GenericApplicationListener for the given delegate.- 参数:
delegate- the delegate listener to be invoked
-
-
方法详细资料
-
onApplicationEvent
从接口复制的说明:ApplicationListenerHandle an application event.- 指定者:
onApplicationEvent在接口中ApplicationListener<ApplicationEvent>- 参数:
event- the event to respond to
-
supportsEventType
public boolean supportsEventType(cn.taketoday.core.ResolvableType eventType) 从接口复制的说明:GenericApplicationListenerDetermine whether this listener actually supports the given event type.- 指定者:
supportsEventType在接口中GenericApplicationListener- 参数:
eventType- the event type (nevernull)
-
supportsSourceType
从接口复制的说明:SmartApplicationListenerDetermine whether this listener actually supports the given source type.The default implementation always returns
true.- 指定者:
supportsSourceType在接口中SmartApplicationListener- 参数:
sourceType- the source type, ornullif no source
-
getOrder
public int getOrder()从接口复制的说明:SmartApplicationListenerDetermine 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- 指定者:
getOrder在接口中SmartApplicationListener
-
getListenerId
从接口复制的说明:SmartApplicationListenerReturn an optional identifier for the listener.The default value is an empty String.
-