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.
There is no necessity for Spring applications to depend
on ApplicationContext or even BeanFactory functionality
explicitly. One of the strengths of the Spring architecture
is that application objects can often be configured without
any dependency on Spring-specific APIs.
|
Java Source File Name | Type | Comment |
ApplicationContext.java | Interface | Central interface to provide configuration for an application.
This is read-only while the application is running, but may be
reloaded if the implementation supports this.
An ApplicationContext provides:
|
ApplicationContextAware.java | Interface | Interface to be implemented by any object that wishes to be notified
of the
ApplicationContext that it runs in.
Implementing this interface makes sense for example when an object
requires access to a set of collaborating beans. |
ApplicationContextException.java | Class | Exception thrown during application context initialization. |
ApplicationEvent.java | Class | Class to be extended by all application events. |
ApplicationEventPublisher.java | Interface | Interface that encapsulates event publication functionality. |
ApplicationEventPublisherAware.java | Interface | Interface to be implemented by any object that wishes to be notified
of the ApplicationEventPublisher (typically the ApplicationContext)
that it runs in. |
ApplicationListener.java | Interface | Interface to be implemented by application event listeners. |
ConfigurableApplicationContext.java | Interface | SPI interface to be implemented by most if not all application contexts.
Provides facilities to configure an application context in addition
to the application context client methods in the
org.springframework.context.ApplicationContext interface.
Configuration and lifecycle methods are encapsulated here to avoid
making them obvious to ApplicationContext client code. |
HierarchicalMessageSource.java | Interface | Sub-interface of MessageSource to be implemented by objects that
can resolve messages hierarchically. |
Lifecycle.java | Interface | Interface defining methods for start/stop lifecycle control.
The typical use case for this is to control asynchronous processing.
Can be implemented by both components (typically a Spring bean defined in
a Spring
org.springframework.beans.factory.BeanFactory ) and containers
(typically a Spring
ApplicationContext ). |
MessageSource.java | Interface | Strategy interface for resolving messages, with support for the parameterization
and internationalization of such messages. |
MessageSourceAware.java | Interface | Interface to be implemented by any object that wishes to be notified
of the MessageSource (typically the ApplicationContext) that it runs in. |
MessageSourceResolvable.java | Interface | Interface for objects that are suitable for message resolution in a
MessageSource . |
NoSuchMessageException.java | Class | Exception thrown when a message can't be resolved. |
ResourceLoaderAware.java | Interface | Interface to be implemented by any object that wishes to be notified of
the ResourceLoader (typically the ApplicationContext) that it runs in.
This is an alternative to a full ApplicationContext dependency via the
ApplicationContextAware interface.
Note that Resource dependencies can also be exposed as bean properties
of type Resource, populated via Strings with automatic type conversion by
the bean factory. |