接口 EventListenerFactory

所有已知实现类:
DefaultEventListenerFactory

public interface EventListenerFactory
Strategy interface for creating ApplicationListener for methods annotated with EventListener.
从以下版本开始:
4.0
作者:
Stephane Nicoll
  • 方法详细资料

    • supportsMethod

      boolean supportsMethod(Method method)
      Specify if this factory supports the specified Method.
      参数:
      method - an EventListener annotated method
      返回:
      true if this factory supports the specified method
    • createApplicationListener

      ApplicationListener<?> createApplicationListener(String beanName, Class<?> type, Method method)
      Create an ApplicationListener for the specified method.
      参数:
      beanName - the name of the bean
      type - the target type of the instance
      method - the EventListener annotated method
      返回:
      an application listener, suitable to invoke the specified method