# Uses of Interface
org.springframework.context.Lifecycle

Packages that use Lifecycle
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.annotation
Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.
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.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 Lifecycle in org.springframework.context

Subinterfaces of Lifecycle in org.springframework.context
Modifier and Type
Interface
Description
`interface`
`ConfigurableApplicationContext`
SPI interface to be implemented by most if not all application contexts.
`interface`
`LifecycleProcessor`
Strategy interface for processing Lifecycle beans within the ApplicationContext.
`interface`
`SmartLifecycle`
An extension of the `Lifecycle` interface for those objects that require to be started upon `ApplicationContext` refresh and/or shutdown in a particular order.

## Uses of Lifecycle in org.springframework.context.annotation

Classes in org.springframework.context.annotation that implement Lifecycle
Modifier and Type
Class
Description
`class`
`AnnotationConfigApplicationContext`
Standalone application context, accepting component classes as input — in particular `@Configuration`-annotated classes, but also plain `@Component` types and JSR-330 compliant classes using `jakarta.inject` annotations.

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

Classes in org.springframework.context.support that implement Lifecycle
Modifier and Type
Class
Description
`class`
`AbstractApplicationContext`
Abstract implementation of the `ApplicationContext` interface.
`class`
`AbstractRefreshableApplicationContext`
Base class for `ApplicationContext` implementations which are supposed to support multiple calls to `AbstractApplicationContext.refresh()`, creating a new internal bean factory instance every time.
`class`
`AbstractRefreshableConfigApplicationContext`
`AbstractRefreshableApplicationContext` subclass that adds common handling of specified config locations.
`class`
`AbstractXmlApplicationContext`
Convenient base class for `ApplicationContext` implementations, drawing configuration from XML documents containing bean definitions understood by an `XmlBeanDefinitionReader`.
`class`
`ClassPathXmlApplicationContext`
Standalone XML application context, taking the context definition files from the class path, interpreting plain paths as class path resource names that include the package path (for example, "mypackage/myresource.txt").
`class`
`DefaultLifecycleProcessor`
Spring's default implementation of the `LifecycleProcessor` strategy.
`class`
`FileSystemXmlApplicationContext`
Standalone XML application context, taking the context definition files from the file system or from URLs, interpreting plain paths as relative file system locations (for example, "mydir/myfile.txt").
`class`
`GenericApplicationContext`
Generic ApplicationContext implementation that holds a single internal `DefaultListableBeanFactory` instance and does not assume a specific bean definition format.
`class`
`GenericGroovyApplicationContext`
An `ApplicationContext` implementation that extends `GenericApplicationContext` and implements `GroovyObject` such that beans can be retrieved with the dot de-reference syntax instead of using `AbstractApplicationContext.getBean(java.lang.String)`.
`class`
`GenericXmlApplicationContext`
Convenient application context with built-in XML support.
`class`
`StaticApplicationContext`
`ApplicationContext` implementation which supports programmatic registration of beans and messages, rather than reading bean definitions from external configuration sources.
Methods in org.springframework.context.support that return types with arguments of type Lifecycle
Modifier and Type
Method
Description
`protected Map<String,Lifecycle>`
DefaultLifecycleProcessor.`getLifecycleBeans()`
Retrieve all applicable Lifecycle beans: all singletons that have already been created, as well as all SmartLifecycle beans (even if they are marked as lazy-init).
Methods in org.springframework.context.support with parameters of type Lifecycle
Modifier and Type
Method
Description
`protected int`
DefaultLifecycleProcessor.`getPhase(Lifecycle bean)`
Determine the lifecycle phase of the given bean.

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

Classes in org.springframework.scheduling.concurrent that implement Lifecycle
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.