public class GenericApplicationListenerAdapter extends Object implements GenericApplicationListener, SmartApplicationListener
GenericApplicationListener adapter that determines supported event types
through introspecting the generically declared type of the target listener.ApplicationListener.onApplicationEvent(E)| 构造器和说明 |
|---|
GenericApplicationListenerAdapter(ApplicationListener<?> delegate)
Create a new GenericApplicationListener for the given delegate.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getOrder() |
void |
onApplicationEvent(ApplicationEvent event)
Handle an application event.
|
boolean |
supportsEventType(Class<? extends ApplicationEvent> eventType)
Determine whether this listener actually supports the given event type.
|
boolean |
supportsEventType(org.springframework.core.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.
|
public GenericApplicationListenerAdapter(ApplicationListener<?> delegate)
delegate - the delegate listener to be invokedpublic void onApplicationEvent(ApplicationEvent event)
ApplicationListeneronApplicationEvent 在接口中 ApplicationListener<ApplicationEvent>event - the event to respond topublic boolean supportsEventType(org.springframework.core.ResolvableType eventType)
GenericApplicationListenersupportsEventType 在接口中 GenericApplicationListenereventType - the event type (never null)public boolean supportsEventType(Class<? extends ApplicationEvent> eventType)
SmartApplicationListenersupportsEventType 在接口中 SmartApplicationListenereventType - the event type (never null)public boolean supportsSourceType(@Nullable
Class<?> sourceType)
GenericApplicationListenersupportsSourceType 在接口中 GenericApplicationListenersupportsSourceType 在接口中 SmartApplicationListenersourceType - the source type, or null if no sourcepublic int getOrder()
getOrder 在接口中 org.springframework.core.Ordered