Interface EventListenerFactory
- All Known Implementing Classes:
DefaultEventListenerFactory
,TransactionalEventListenerFactory
public interface EventListenerFactory
Strategy interface for creatingApplicationListener
for methods annotated withEventListener
.- Since:
- 4.2
- Author:
- Stephane Nicoll
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationListener<?>
createApplicationListener(String beanName, Class<?> type, Method method)
Create anApplicationListener
for the specified method.boolean
supportsMethod(Method method)
Specify if this factory supports the specifiedMethod
.
Method Detail
supportsMethod
boolean supportsMethod(Method method)
Specify if this factory supports the specifiedMethod
.- Parameters:
method
- anEventListener
annotated method- Returns:
true
if this factory supports the specified method
createApplicationListener
ApplicationListener<?> createApplicationListener(String beanName, Class<?> type, Method method)
Create anApplicationListener
for the specified method.- Parameters:
beanName
- the name of the beantype
- the target type of the instancemethod
- theEventListener
annotated method- Returns:
- an application listener, suitable to invoke the specified method