org.mule.extras.spring
Class SpringContainerContext

java.lang.Object
  extended byorg.mule.impl.container.AbstractContainerContext
      extended byorg.mule.extras.spring.SpringContainerContext
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.mule.umo.lifecycle.Disposable, org.mule.umo.lifecycle.Initialisable, org.mule.umo.manager.UMOContainerContext

public class SpringContainerContext
extends org.mule.impl.container.AbstractContainerContext
implements org.springframework.beans.factory.BeanFactoryAware

SpringContainerContext is a Spring Context that can expose spring-managed components for use in the Mule framework.


Field Summary
protected  org.springframework.beans.factory.BeanFactory beanFactory
          the application contect to use when resolving components
protected  String configFile
           
protected  String configuration
           
protected  org.springframework.beans.factory.BeanFactory externalBeanFactory
           
protected static Log logger
          logger used by this class
static String SPRING_DOCTYPE_REF
           
 
Constructor Summary
SpringContainerContext()
           
 
Method Summary
 void configure(Reader configuration)
           
 void configure(String configurationXmlAsString)
          Configure Spring by passing an in-memory XML Spring config.
 void dispose()
           
 org.springframework.beans.factory.BeanFactory getBeanFactory()
          The spring application context used to build components
 Object getComponent(Object key)
           
 String getConfigFile()
           
 String getConfiguration()
           
 void initialise()
           
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
          Sets the spring application context used to build components
 void setConfigFile(String configFile)
           
 void setConfiguration(String configuration)
           
 void setExternalBeanFactory(org.springframework.beans.factory.BeanFactory factory)
           
 
Methods inherited from class org.mule.impl.container.AbstractContainerContext
configure, getDefaultDocType, getDefaultEncoding, getName, getXmlDeclaration, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPRING_DOCTYPE_REF

public static final String SPRING_DOCTYPE_REF
See Also:
Constant Field Values

logger

protected static Log logger
logger used by this class


beanFactory

protected org.springframework.beans.factory.BeanFactory beanFactory
the application contect to use when resolving components


externalBeanFactory

protected org.springframework.beans.factory.BeanFactory externalBeanFactory

configFile

protected String configFile

configuration

protected String configuration
Constructor Detail

SpringContainerContext

public SpringContainerContext()
Method Detail

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Sets the spring application context used to build components

Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Parameters:
beanFactory - the context to use

setExternalBeanFactory

public void setExternalBeanFactory(org.springframework.beans.factory.BeanFactory factory)

getBeanFactory

public org.springframework.beans.factory.BeanFactory getBeanFactory()
The spring application context used to build components

Returns:
spring application context

getComponent

public Object getComponent(Object key)
                    throws org.mule.umo.manager.ObjectNotFoundException
Specified by:
getComponent in interface org.mule.umo.manager.UMOContainerContext
Throws:
org.mule.umo.manager.ObjectNotFoundException

getConfigFile

public String getConfigFile()

setConfigFile

public void setConfigFile(String configFile)
                   throws org.mule.config.ConfigurationException
Parameters:
configFile - The configFile to set.
Throws:
org.mule.config.ConfigurationException

configure

public void configure(Reader configuration)
               throws org.mule.umo.manager.ContainerException
Throws:
org.mule.umo.manager.ContainerException

configure

public void configure(String configurationXmlAsString)
               throws org.mule.umo.manager.ContainerException
Configure Spring by passing an in-memory XML Spring config.

Parameters:
configurationXmlAsString - XML config contents
Throws:
org.mule.umo.manager.ContainerException - in case of any error

initialise

public void initialise()
                throws org.mule.umo.lifecycle.InitialisationException
Specified by:
initialise in interface org.mule.umo.lifecycle.Initialisable
Throws:
org.mule.umo.lifecycle.InitialisationException

dispose

public void dispose()
Specified by:
dispose in interface org.mule.umo.lifecycle.Disposable

getConfiguration

public String getConfiguration()

setConfiguration

public void setConfiguration(String configuration)


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.