Interface ApplicationContextAware

All Known Subinterfaces:
HandlerAdapter, HandlerMapping, ViewResolver
All Known Implementing Classes:
ApplicationObjectSupport, AbstractXsltView

public interface ApplicationContextAware

Interface to be implemented by any object that wishes to be notified of the application context it runs in.

Rod Johnson

Method Summary
 void setApplicationContext(ApplicationContext ctx)
          Set the ApplicationContext used by this object.

Method Detail


public void setApplicationContext(ApplicationContext ctx)
                           throws ApplicationContextException
Set the ApplicationContext used by this object. Normally this call will be used to initialize the object. Note that this call can occur multiple times: The implementation must check itself that if it is already initialized resp. if it wants to perform reinitialization.
ctx - ApplicationContext object used by this object
ApplicationContextException - if initialization attempted by this object after it has access to the WebApplicatinContext fails

Rod Johnson and Spring contributors 2001-2003.