org.milyn.container.standalone
Class StandaloneApplicationContext

java.lang.Object
  extended by org.milyn.container.standalone.StandaloneApplicationContext
All Implemented Interfaces:
ApplicationContext, BoundAttributeStore

public class StandaloneApplicationContext
extends Object
implements ApplicationContext

Standalone container execution context for Smooks.

This context allows Smooks to be executed outside the likes of a Servlet Container.

Author:
tfennelly

Constructor Summary
StandaloneApplicationContext()
          Public constructor.
 
Method Summary
 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 getAttributes()
          Returns the Map of attributes bound in this BoundAttributeStore
 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 setResourceLocator(ContainerResourceLocator resourceLocator)
          Set the resource locator for this Smooks application context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandaloneApplicationContext

public StandaloneApplicationContext()
Public constructor.

Method Detail

setAttribute

public void setAttribute(Object key,
                         Object value)
Description copied from interface: BoundAttributeStore
Binds an object to this BoundAttributeStore implementation, using the name specified. If an object of the same name is already bound, the object is replaced.

Specified by:
setAttribute in interface BoundAttributeStore
Parameters:
key - The key against which the object is bound; cannot be null.
value - The object to be bound; cannot be null.

getAttribute

public Object getAttribute(Object key)
Description copied from interface: BoundAttributeStore
Returns the object bound with the specified name in this BoundAttributeStore implementation, or null if no object is bound under the name.

Specified by:
getAttribute in interface BoundAttributeStore
Parameters:
key - The key against which the object is bound; cannot be null.
Returns:
The object bound with the specified name in this BoundAttributeStore implementation, or null if no object is bound under the name.

removeAttribute

public void removeAttribute(Object key)
Description copied from interface: BoundAttributeStore
Removes the object bound with the specified name from this BoundAttributeStore implementation. If the BoundAttributeStore implementation does not have an object bound with the specified name, this method does nothing.

Specified by:
removeAttribute in interface BoundAttributeStore
Parameters:
key - The key against which the object is bound; cannot be null.

getResourceLocator

public ContainerResourceLocator getResourceLocator()
Description copied from interface: ApplicationContext
Get the container resource locator for the context.

Specified by:
getResourceLocator in interface ApplicationContext
Returns:
ContainerResourceLocator for the context.

setResourceLocator

public void setResourceLocator(ContainerResourceLocator resourceLocator)
Description copied from interface: ApplicationContext
Set the resource locator for this Smooks application context.

Specified by:
setResourceLocator in interface ApplicationContext
Parameters:
resourceLocator - The Resource locator.

getStore

public SmooksResourceConfigurationStore getStore()
Description copied from interface: ApplicationContext
Get the Store for from the container application context.

Specified by:
getStore in interface ApplicationContext
Returns:
SmooksResourceConfigurationStore instance.

getProfileStore

public ProfileStore getProfileStore()
Get the ProfileStore in use within the Standalone Context.

Specified by:
getProfileStore in interface ApplicationContext
Returns:
The ProfileStore.

getAttributes

public Map getAttributes()
Description copied from interface: BoundAttributeStore
Returns the Map of attributes bound in this BoundAttributeStore

Specified by:
getAttributes in interface BoundAttributeStore
Returns:
Map of all objects bound in this BoundAttributeStore


Copyright © 2008. All Rights Reserved.