Package org.springframework.context.event

# Interface EventListenerFactory

All Known Implementing Classes:
  `DefaultEventListenerFactory`

public interface EventListenerFactory
Strategy interface for creating `ApplicationListener` for methods annotated with `EventListener`.

Since:
  4.2
Author:
  Stephane Nicoll

## Method Summary

Modifier and Type
Method
Description
`ApplicationListener<?>`
`createApplicationListener(String beanName, Class<?> type, Method method)`
Create an `ApplicationListener` for the specified method.
`boolean`
`supportsMethod(Method method)`
Specify if this factory supports the specified `Method`.

## Method Details

### supportsMethod

boolean supportsMethod(Method method)
Specify if this factory supports the specified `Method`.

Parameters:
  `method` - an `EventListener` annotated method
Returns:
  `true` if this factory supports the specified method

### createApplicationListener

ApplicationListener<?> createApplicationListener(String beanName, Class<?> type, Method method)
Create an `ApplicationListener` for the specified method.

Parameters:
  `beanName` - the name of the bean
  `type` - the target type of the instance
  `method` - the `EventListener` annotated method
Returns:
  an application listener, suitable to invoke the specified method