public interface SmartApplicationListener extends ApplicationListener<ApplicationEvent>, org.springframework.core.Ordered
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.
GenericApplicationListener
,
GenericApplicationListenerAdapter
Modifier and Type | Method and Description |
---|---|
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.
|
onApplicationEvent
boolean supportsEventType(Class<? extends ApplicationEvent> eventType)
eventType
- the event type (never null
)boolean supportsSourceType(@Nullable Class<?> sourceType)
sourceType
- the source type, or null
if no source