org.springframework.context
Interface ApplicationContext
- All Superinterfaces: 
- ApplicationEventPublisher, BeanFactory, HierarchicalBeanFactory, ListableBeanFactory, MessageSource, ResourceLoader, ResourcePatternResolver
- All Known Subinterfaces: 
- ConfigurableApplicationContext, ConfigurableWebApplicationContext, WebApplicationContext
- All Known Implementing Classes: 
- AbstractApplicationContext, AbstractRefreshableWebApplicationContext, StaticWebApplicationContext
- public interface ApplicationContext- extends ListableBeanFactory, HierarchicalBeanFactory, MessageSource, ApplicationEventPublisher, ResourcePatternResolver
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:
 
 - Bean factory methods, inherited from ListableBeanFactory.
 This avoids the need for applications to use singletons.
 
- The ability to resolve messages, supporting internationalization.
 Inherited from the MessageSource interface.
 
- The ability to load file resources in a generic fashion.
 Inherited from the ResourceLoader interface.
 
- The ability to publish events. Implementations must provide a means
 of registering event listeners.
 
- Inheritance from a parent context. Definitions in a descendant context
 will always take priority. This means, for example, that a single parent
 context can be used by an entire web application, while each servlet has
 its own child context that is independent of that of any other servlet.
 
In addition to standard bean factory lifecycle capabilities,
 ApplicationContext implementations need to detect ApplicationContextAware
 beans and invoke the setApplicationContext method accordingly.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
 
 
 
 
 
 
 
 
 
 
getParent
public ApplicationContext getParent()
- Return the parent context, or null if there is no parent,
 and this is the root of the context hierarchy.
 
- 
 
- 
- Returns:
- the parent context, or null if there is no parent
 
getDisplayName
public String getDisplayName()
- Return a friendly name for this context.
 
- 
 
- 
- Returns:
- a display name for this context
 
getStartupDate
public long getStartupDate()
- Return the timestamp when this context was first loaded.
 
- 
 
- 
- Returns:
- the timestamp (ms) when this context was first loaded
 
publishEvent
public void publishEvent(ApplicationEvent event)
- Notify all listeners registered with this application of an application
 event. Events may be framework events (such as RequestHandledEvent)
 or application-specific events.
 
- 
- Specified by:
- publishEventin interface- ApplicationEventPublisher
 
- 
- Parameters:
- event- event to publish
- See Also:
- RequestHandledEvent
 
Copyright (C) 2003-2004 The Spring Framework Project.