Class ApplicationListenerMethodAdapter

All Implemented Interfaces:
EventListener, ApplicationListener<ApplicationEvent>, GenericApplicationListener, SmartApplicationListener, Ordered
Direct Known Subclasses:

public class ApplicationListenerMethodAdapter extends Object implements GenericApplicationListener
GenericApplicationListener adapter that delegates the processing of an event to an EventListener annotated method.

Delegates to processEvent(ApplicationEvent) to give subclasses a chance to deviate from the default. Unwraps the content of a PayloadApplicationEvent if necessary to allow a method declaration to define any arbitrary event type. If a condition is defined, it is evaluated prior to invoking the underlying method.

Stephane Nicoll, Juergen Hoeller, Sam Brannen, Sebastien Deleuze
  • Field Details

    • logger

      protected final Log logger
  • Constructor Details

    • ApplicationListenerMethodAdapter

      public ApplicationListenerMethodAdapter(String beanName, Class<?> targetClass, Method method)
      Construct a new ApplicationListenerMethodAdapter.
      beanName - the name of the bean to invoke the listener method on
      targetClass - the target class that the method is declared on
      method - the listener method to invoke
  • Method Details