Class ApplicationObjectSupport

All Implemented Interfaces:
Aware, ApplicationContextAware
Direct Known Subclasses:
AbstractHandlerMapping, WebApplicationObjectSupport

public abstract class ApplicationObjectSupport extends Object implements ApplicationContextAware
Convenient superclass for application objects that want to be aware of the application context, e.g. for custom lookup of collaborating beans or for context-specific resource access. It saves the application context reference and provides an initialization callback method. Furthermore, it offers numerous convenience methods for message lookup.

There is no requirement to subclass this class: It just makes things a little easier if you need access to the context, e.g. for access to file resources or to the message source. Note that many application objects do not need to be aware of the application context at all, as they can receive collaborating beans via bean references.

Many framework classes are derived from this class, particularly within the web support.

Rod Johnson, Juergen Hoeller
See Also: