public class StandaloneApplicationContext extends Object implements ApplicationContext
Modifier and Type | Method and Description |
---|---|
void |
addBeanContextLifecycleObserver(BeanContextLifecycleObserver observer)
Registers a bean context observer.
|
static StandaloneApplicationContext |
createNewInstance(boolean registerInstalledResources)
create a new context
|
Object |
getAttribute(Object key)
Returns the object bound with the specified name in this
BoundAttributeStore
implementation, or null if no object is bound under the name. |
Map<Object,Object> |
getAttributes()
Returns the Map of attributes bound in this
BoundAttributeStore |
Collection<BeanContextLifecycleObserver> |
getBeanContextLifecycleObservers()
Get bean context observers.
|
BeanIdStore |
getBeanIdStore()
Get the BeanIdStore in use within this Context
|
ClassLoader |
getClassLoader()
Get the
ClassLoader to be used by the associated Smooks instance |
ProfileStore |
getProfileStore()
Get the ProfileStore in use within the Standalone Context.
|
ContainerResourceLocator |
getResourceLocator()
Get the container resource locator for the context.
|
SmooksResourceConfigurationStore |
getStore()
Get the Store for from the container application context.
|
void |
removeAttribute(Object key)
Removes the object bound with the specified name from this
BoundAttributeStore
implementation. |
void |
setAttribute(Object key,
Object value)
Binds an object to this
BoundAttributeStore implementation, using the name
specified. |
void |
setClassLoader(ClassLoader classLoader) |
void |
setResourceLocator(ContainerResourceLocator resourceLocator)
Set the resource locator for this Smooks application context.
|
public static StandaloneApplicationContext createNewInstance(boolean registerInstalledResources)
public void setAttribute(Object key, Object value)
BoundAttributeStore
BoundAttributeStore
implementation, using the name
specified. If an object of the same name is already bound, the object
is replaced.
setAttribute
in interface BoundAttributeStore
key
- The key against which the object is bound; cannot be null.value
- The object to be bound; cannot be null.public Object getAttribute(Object key)
BoundAttributeStore
BoundAttributeStore
implementation, or null if no object is bound under the name.getAttribute
in interface BoundAttributeStore
key
- The key against which the object is bound; cannot be null.BoundAttributeStore
implementation, or null if no object is bound under the name.public void removeAttribute(Object key)
BoundAttributeStore
BoundAttributeStore
implementation. If the BoundAttributeStore
implementation does
not have an object bound with the specified name, this method does nothing.removeAttribute
in interface BoundAttributeStore
key
- The key against which the object is bound; cannot be null.public ContainerResourceLocator getResourceLocator()
ApplicationContext
getResourceLocator
in interface ApplicationContext
public void setResourceLocator(ContainerResourceLocator resourceLocator)
ApplicationContext
setResourceLocator
in interface ApplicationContext
resourceLocator
- The Resource locator.public SmooksResourceConfigurationStore getStore()
ApplicationContext
getStore
in interface ApplicationContext
public ProfileStore getProfileStore()
getProfileStore
in interface ApplicationContext
public Map<Object,Object> getAttributes()
BoundAttributeStore
BoundAttributeStore
getAttributes
in interface BoundAttributeStore
BoundAttributeStore
public BeanIdStore getBeanIdStore()
ApplicationContext
getBeanIdStore
in interface ApplicationContext
public void addBeanContextLifecycleObserver(BeanContextLifecycleObserver observer)
ApplicationContext
BeanContext
instances.addBeanContextLifecycleObserver
in interface ApplicationContext
observer
- The actual BeanObserver instance.public Collection<BeanContextLifecycleObserver> getBeanContextLifecycleObservers()
ApplicationContext
BeanContext
instances.getBeanContextLifecycleObservers
in interface ApplicationContext
ApplicationContext.addBeanContextLifecycleObserver(org.milyn.javabean.lifecycle.BeanContextLifecycleObserver)
public void setClassLoader(ClassLoader classLoader)
public ClassLoader getClassLoader()
ApplicationContext
ClassLoader
to be used by the associated Smooks instancegetClassLoader
in interface ApplicationContext
Copyright © 2020. All rights reserved.