# Uses of Interface
org.springframework.context.ApplicationListener

Packages that use ApplicationListener
Package
Description
org.springframework.context
This package builds on the beans package to add support for message sources and for the Observer design pattern, and the ability for application objects to obtain resources using a consistent API.
org.springframework.context.event
Support classes for application events, like standard context events.
org.springframework.context.support
Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.
org.springframework.scheduling.annotation
Annotation support for asynchronous method execution.
org.springframework.scheduling.concurrent
Scheduling convenience classes for the `java.util.concurrent` and `jakarta.enterprise.concurrent` packages, allowing to set up a ThreadPoolExecutor or ScheduledThreadPoolExecutor as a bean in a Spring context.

## Uses of ApplicationListener in org.springframework.context

Methods in org.springframework.context that return ApplicationListener
Modifier and Type
Method
Description
`static <T> ApplicationListener<PayloadApplicationEvent<T>>`
ApplicationListener.`forPayload(Consumer<T> consumer)`
Create a new `ApplicationListener` for the given payload consumer.
Methods in org.springframework.context with parameters of type ApplicationListener
Modifier and Type
Method
Description
`void`
ConfigurableApplicationContext.`addApplicationListener(ApplicationListener<?> listener)`
Add a new ApplicationListener that will be notified on context events such as context refresh and context shutdown.
`void`
ConfigurableApplicationContext.`removeApplicationListener(ApplicationListener<?> listener)`
Remove the given ApplicationListener from this context's set of listeners, assuming it got registered via `ConfigurableApplicationContext.addApplicationListener(org.springframework.context.ApplicationListener<?>)` before.

## Uses of ApplicationListener in org.springframework.context.event

Subinterfaces of ApplicationListener in org.springframework.context.event
Modifier and Type
Interface
Description
`interface`
`GenericApplicationListener`
Extended variant of the standard `ApplicationListener` interface, exposing further metadata such as the supported event and source type.
`interface`
`SmartApplicationListener`
Extended variant of the standard `ApplicationListener` interface, exposing further metadata such as the supported event and source type.
Classes in org.springframework.context.event that implement ApplicationListener
Modifier and Type
Class
Description
`class`
`ApplicationListenerMethodAdapter`
`GenericApplicationListener` adapter that delegates the processing of an event to an `EventListener` annotated method.
`class`
`GenericApplicationListenerAdapter`
`GenericApplicationListener` adapter that determines supported event types through introspecting the generically declared type of the target listener.
`class`
`SourceFilteringListener`
`ApplicationListener` decorator that filters events from a specified event source, invoking its delegate listener for matching `ApplicationEvent` objects only.
Methods in org.springframework.context.event that return ApplicationListener
Modifier and Type
Method
Description
`ApplicationListener<?>`
DefaultEventListenerFactory.`createApplicationListener(String beanName, Class<?> type, Method method)`
`ApplicationListener<?>`
EventListenerFactory.`createApplicationListener(String beanName, Class<?> type, Method method)`
Create an `ApplicationListener` for the specified method.
Methods in org.springframework.context.event that return types with arguments of type ApplicationListener
Modifier and Type
Method
Description
`protected Collection<ApplicationListener<?>>`
AbstractApplicationEventMulticaster.`getApplicationListeners()`
Return a Collection containing all ApplicationListeners.
`protected Collection<ApplicationListener<?>>`
AbstractApplicationEventMulticaster.`getApplicationListeners(ApplicationEvent event, org.springframework.core.ResolvableType eventType)`
Return a Collection of ApplicationListeners matching the given event type.
Methods in org.springframework.context.event with parameters of type ApplicationListener
Modifier and Type
Method
Description
`void`
AbstractApplicationEventMulticaster.`addApplicationListener(ApplicationListener<?> listener)`
`void`
ApplicationEventMulticaster.`addApplicationListener(ApplicationListener<?> listener)`
Add a listener to be notified of all events.
`protected void`
SimpleApplicationEventMulticaster.`invokeListener(ApplicationListener<?> listener, ApplicationEvent event)`
Invoke the given listener with the given event.
`void`
AbstractApplicationEventMulticaster.`removeApplicationListener(ApplicationListener<?> listener)`
`void`
ApplicationEventMulticaster.`removeApplicationListener(ApplicationListener<?> listener)`
Remove a listener from the notification list.
`protected boolean`
AbstractApplicationEventMulticaster.`supportsEvent(ApplicationListener<?> listener, org.springframework.core.ResolvableType eventType, Class<?> sourceType)`
Determine whether the given listener supports the given event.
Method parameters in org.springframework.context.event with type arguments of type ApplicationListener
Modifier and Type
Method
Description
`void`
AbstractApplicationEventMulticaster.`removeApplicationListeners(Predicate<ApplicationListener<?>> predicate)`
`void`
ApplicationEventMulticaster.`removeApplicationListeners(Predicate<ApplicationListener<?>> predicate)`
Remove all matching listeners from the set of registered `ApplicationListener` instances (which includes adapter classes such as `ApplicationListenerMethodAdapter`, for example, for annotated `EventListener` methods).
Constructors in org.springframework.context.event with parameters of type ApplicationListener
Modifier
Constructor
Description
``
`GenericApplicationListenerAdapter(ApplicationListener<?> delegate)`
Create a new GenericApplicationListener for the given delegate.
``
`SourceFilteringListener(Object source, ApplicationListener<?> delegate)`
Create a SourceFilteringListener for the given event source.

## Uses of ApplicationListener in org.springframework.context.support

Methods in org.springframework.context.support that return types with arguments of type ApplicationListener
Modifier and Type
Method
Description
`Collection<ApplicationListener<?>>`
AbstractApplicationContext.`getApplicationListeners()`
Return the list of statically specified ApplicationListeners.
Methods in org.springframework.context.support with parameters of type ApplicationListener
Modifier and Type
Method
Description
`void`
AbstractApplicationContext.`addApplicationListener(ApplicationListener<?> listener)`
`void`
AbstractApplicationContext.`removeApplicationListener(ApplicationListener<?> listener)`

## Uses of ApplicationListener in org.springframework.scheduling.annotation

Classes in org.springframework.scheduling.annotation that implement ApplicationListener
Modifier and Type
Class
Description
`class`
`ScheduledAnnotationBeanPostProcessor`
Bean post-processor that registers methods annotated with `@Scheduled` to be invoked by a `TaskScheduler` according to the "fixedRate", "fixedDelay", or "cron" expression provided via the annotation.

## Uses of ApplicationListener in org.springframework.scheduling.concurrent

Classes in org.springframework.scheduling.concurrent that implement ApplicationListener
Modifier and Type
Class
Description
`class`
`ExecutorConfigurationSupport`
Base class for setting up a `ExecutorService` (typically a `ThreadPoolExecutor` or `ScheduledThreadPoolExecutor`).
`class`
`ScheduledExecutorFactoryBean`
`FactoryBean` that sets up a `ScheduledExecutorService` (by default: a `ScheduledThreadPoolExecutor`) and exposes it for bean references.
`class`
`SimpleAsyncTaskScheduler`
A simple implementation of Spring's `TaskScheduler` interface, using a single scheduler thread and executing every scheduled task in an individual separate thread.
`class`
`ThreadPoolExecutorFactoryBean`
JavaBean that allows for configuring a `ThreadPoolExecutor` in bean style (through its "corePoolSize", "maxPoolSize", "keepAliveSeconds", "queueCapacity" properties) and exposing it as a bean reference of its native `ExecutorService` type.
`class`
`ThreadPoolTaskExecutor`
JavaBean that allows for configuring a `ThreadPoolExecutor` in bean style (through its "corePoolSize", "maxPoolSize", "keepAliveSeconds", "queueCapacity" properties) and exposing it as a Spring `TaskExecutor`.
`class`
`ThreadPoolTaskScheduler`
A standard implementation of Spring's `TaskScheduler` interface, wrapping a native `ScheduledThreadPoolExecutor` and providing all applicable configuration options for it.