Interface SmartApplicationListener
- All Superinterfaces:
ApplicationListener<ApplicationEvent>
,EventListener
,Ordered
- All Known Implementing Classes:
DefaultSimpUserRegistry
,GenericApplicationListenerAdapter
,MultiServerUserRegistry
,SourceFilteringListener
public interface SmartApplicationListener extends ApplicationListener<ApplicationEvent>, Ordered
Extended variant of the standardApplicationListener
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.- Since:
- 3.0
- Author:
- Juergen Hoeller
- See Also:
GenericApplicationListener
,GenericApplicationListenerAdapter
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.Methods inherited from interface org.springframework.context.ApplicationListener
onApplicationEvent
Method Detail
supportsEventType
boolean supportsEventType(Class<? extends ApplicationEvent> eventType)
Determine whether this listener actually supports the given event type.- Parameters:
eventType
- the event type (nevernull
)
supportsSourceType
boolean supportsSourceType(Class<?> sourceType)
Determine whether this listener actually supports the given source type.- Parameters:
sourceType
- the source type, ornull
if no source