Interface EventListenerFactory

All Known Implementing Classes:
DefaultEventListenerFactory, RestrictedTransactionalEventListenerFactory, TransactionalEventListenerFactory

public interface EventListenerFactory
Strategy interface for creating ApplicationListener for methods annotated with EventListener.
Since:
4.2
Author:
Stephane Nicoll
  • 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