|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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.
The configuration provides:
| Method Summary | |
java.lang.String |
getDisplayName()
Return a friendly name for this context. |
ContextOptions |
getOptions()
Return context options. |
ApplicationContext |
getParent()
Return the parent context, or null if there is no parent, and this is the root of the context hierarchy. |
java.io.InputStream |
getResourceAsStream(java.lang.String location)
Open an InputStream to the specified resource: Must support fully qualified URLs, e.g. |
java.lang.String |
getResourceBasePath()
Return the base path for relatively addressed resources for this application context. |
long |
getStartupDate()
Return the timestamp when this context was first loaded |
void |
publishEvent(ApplicationEvent event)
Notify all listeners registered with this application of an application event. |
void |
refresh()
Load or refresh the persistent representation of the configuration, which might for example be an XML file, properties file or relational database schema. |
java.lang.Object |
removeSharedObject(java.lang.String key)
Remove a shared object added with a call to shareObject(). |
java.lang.Object |
sharedObject(java.lang.String key)
Retrieve a shared object added with a call to shareObject(). |
void |
shareObject(java.lang.String key,
java.lang.Object o)
Put an object available for sharing. |
| Methods inherited from interface com.interface21.context.MessageSource |
getMessage, getMessage, getMessage |
| Methods inherited from interface com.interface21.beans.factory.ListableBeanFactory |
getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames |
| Methods inherited from interface com.interface21.beans.factory.BeanFactory |
getAliases, getBean, getBean, isSingleton |
| Method Detail |
public ApplicationContext getParent()
public java.lang.String getDisplayName()
public long getStartupDate()
public ContextOptions getOptions()
ApplicationContext implementations may subclass ContextOptions to add additional properties. It must always be a bean.
public void refresh()
throws ApplicationContextException
ApplicationContextException - if the config cannot be loadedpublic void publishEvent(ApplicationEvent event)
event - event to publish
public java.io.InputStream getResourceAsStream(java.lang.String location)
throws java.io.IOException
Note: Callers are responsible for closing the input stream.
location - location to the resourcejava.io.IOException - exception when opening the specified resourcepublic java.lang.String getResourceBasePath()
Note that this method returns null if this application context does not have a dedicated base path. Accordingly, getResourceAsStream may not support relative paths at all, or use more than one base path for evaluating relative paths.
public void shareObject(java.lang.String key,
java.lang.Object o)
key - object keyo - object to putpublic java.lang.Object sharedObject(java.lang.String key)
public java.lang.Object removeSharedObject(java.lang.String key)
key - the object was added with
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||