org.springframework.context.event

## Interface GenericApplicationListener

- All Superinterfaces:
    ApplicationListener<ApplicationEvent>, EventListener, Ordered, SmartApplicationListener
  All Known Implementing Classes:
    ApplicationListenerMethodAdapter, GenericApplicationListenerAdapter, SourceFilteringListener, TransactionalApplicationListenerMethodAdapter

      public interface GenericApplicationListener
      extends SmartApplicationListener

  Extended variant of the standard `ApplicationListener` interface, exposing further metadata such as the supported event and source type.

  As of Spring Framework 4.2, this interface supersedes the Class-based `SmartApplicationListener` with full handling of generic event types. As of 5.3.5, it formally extends `SmartApplicationListener`, adapting `supportsEventType(Class)` to `supportsEventType(ResolvableType)` with a default method.

  Since:
    4.2
  Author:
    Stephane Nicoll, Juergen Hoeller
  See Also:
    `SmartApplicationListener`, `GenericApplicationListenerAdapter`

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default boolean` | `supportsEventType(Class<? extends ApplicationEvent> eventType)` Overrides `SmartApplicationListener.supportsEventType(Class)` with delegation to `supportsEventType(ResolvableType)`.
    `boolean` | `supportsEventType(ResolvableType eventType)` Determine whether this listener actually supports the given event type.

    - ### Methods inherited from interface org.springframework.context.event.SmartApplicationListener

      `getListenerId, getOrder, supportsSourceType`

    - ### Methods inherited from interface org.springframework.context.ApplicationListener

      `forPayload, onApplicationEvent`

- - ### Method Detail

    - #### supportsEventType

          default boolean supportsEventType(Class<? extends ApplicationEvent> eventType)

      Overrides `SmartApplicationListener.supportsEventType(Class)` with delegation to `supportsEventType(ResolvableType)`.
      Specified by:
        `supportsEventType` in interface `SmartApplicationListener`
      Parameters:
        `eventType` - the event type (never `null`)

    - #### supportsEventType

          boolean supportsEventType(ResolvableType eventType)

      Determine whether this listener actually supports the given event type.
      Parameters:
        `eventType` - the event type (never `null`)