Class ApplicationListenerMethodAdapter

java.lang.Object
org.springframework.context.event.ApplicationListenerMethodAdapter
All Implemented Interfaces:
EventListener, ApplicationListener<ApplicationEvent>, GenericApplicationListener, SmartApplicationListener, Ordered
Direct Known Subclasses:
TransactionalApplicationListenerMethodAdapter

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.

Since:
4.2
Author:
Stephane Nicoll, Juergen Hoeller, Sam Brannen
  • Field Details

    • logger

      protected final Log logger
  • Constructor Details

    • ApplicationListenerMethodAdapter

      public ApplicationListenerMethodAdapter(String beanName, Class<?> targetClass, Method method)
      Construct a new ApplicationListenerMethodAdapter.
      Parameters:
      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