public interface GenericApplicationListener extends SmartApplicationListener
ApplicationListener
interface,
exposing further metadata such as the supported event and source type.
As of Spring Framework 4.2, this interface supersedes the Class-based
SmartApplicationListener
with full handling of generic event types.
As of 5.3.5, it formally extends SmartApplicationListener
, adapting
supportsEventType(Class)
to supportsEventType(ResolvableType)
with a default method.
SmartApplicationListener
,
GenericApplicationListenerAdapter
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier and Type | Method and Description |
---|---|
default boolean |
supportsEventType(Class<? extends ApplicationEvent> eventType)
Overrides
SmartApplicationListener.supportsEventType(Class) with
delegation to supportsEventType(ResolvableType) . |
boolean |
supportsEventType(ResolvableType eventType)
Determine whether this listener actually supports the given event type.
|
getListenerId, getOrder, supportsSourceType
forPayload, onApplicationEvent
default boolean supportsEventType(Class<? extends ApplicationEvent> eventType)
SmartApplicationListener.supportsEventType(Class)
with
delegation to supportsEventType(ResolvableType)
.supportsEventType
in interface SmartApplicationListener
eventType
- the event type (never null
)boolean supportsEventType(ResolvableType eventType)
eventType
- the event type (never null
)