org.mule.extras.spring.config
Class AutowireUMOManagerFactoryBean

java.lang.Object
  extended byorg.mule.extras.spring.config.AutowireUMOManagerFactoryBean

public class AutowireUMOManagerFactoryBean
extends java.lang.Object

UMOManagerFactoryBean is a MuleManager factory bean that is used to configure the MuleManager from a spring context. This factory bean is responsible for determining the instance type of UMOManager to create and then delegates configuration calls to that instance depending on what is available in the container.

Apart from removing the need to explicitly wire the MuleManager instance together there another advantage to using the AutowireUMOManagerFactoryBean. There is no need to declare a UMOModel instance in the configuration. If the factory doesn't find a UMOModel implementation it creates a default one of type org.mule.impl.model.MuleModel. The model is automatically initialised with a SpringContainercontext using the current beanFactory and defaults are used for the other Model properties. If you want to override the defaults, such as define your own exception strategy, (which you will most likely want to do) simply declare your exception strategy bean in the container and it will automatically be set on the model.

Most Mule objects have explicit types and can be autowired, however some objects cannot be autowired, such as a java.util.Map of endpoints for example. For these objects Mule defines standard bean names that will be looked for in the container during start up.

muleEnvironmentProperties A map of properties to set on the MuleManager. Accessible from your code using AutowireUMOManagerFactoryBean.MULE_ENVIRONMENT_PROPERTIES_BEAN_NAME.

muleEndpointMappings A Map of logical endpointUri mappings accessible from your code using AutowireUMOManagerFactoryBean.MULE_ENDPOINT_MAPPINGS_BEAN_NAME.

muleInterceptorStacks A map of interceptotor stacks, where the name of the stack is the key and a list of interceptors is the value. Accessible using from your code using AutowireUMOManagerFactoryBean.MULE_INTERCEPTOR_STACK_BEAN_NAME.

Version:
$Revision: 1.2 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
static java.lang.String MULE_ENDPOINT_IDENTIFIERS_BEAN_NAME
           
static java.lang.String MULE_ENVIRONMENT_PROPERTIES_BEAN_NAME
           
static java.lang.String MULE_INTERCEPTOR_STACK_BEAN_NAME
           
static java.lang.String MULE_MODEL_EXCEPTION_STRATEGY_BEAN_NAME
           
 
Constructor Summary
AutowireUMOManagerFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void createModel()
           
 void destroy()
           
 java.lang.Object getObject()
           
 java.lang.Class getObjectType()
           
 boolean isSingleton()
           
protected  void setAgents(java.util.Collection agents)
           
 void setApplicationContext(ApplicationContext applicationContext)
           
protected  void setComponents(java.util.Collection components)
           
protected  void setConnectors(java.util.Collection connectors)
           
protected  void setContainerContext(java.util.Map containers)
           
protected  void setInterceptorStacks(java.util.Map stacks)
           
protected  void setMessageEndpoints(java.util.Map endpoints)
           
protected  void setProperties(java.util.Map props)
           
protected  void setProviders(java.util.Collection endpoints)
           
protected  void setTransformers(java.util.Collection transformers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static transient Log logger
logger used by this class


MULE_ENVIRONMENT_PROPERTIES_BEAN_NAME

public static final java.lang.String MULE_ENVIRONMENT_PROPERTIES_BEAN_NAME
See Also:
Constant Field Values

MULE_ENDPOINT_IDENTIFIERS_BEAN_NAME

public static final java.lang.String MULE_ENDPOINT_IDENTIFIERS_BEAN_NAME
See Also:
Constant Field Values

MULE_INTERCEPTOR_STACK_BEAN_NAME

public static final java.lang.String MULE_INTERCEPTOR_STACK_BEAN_NAME
See Also:
Constant Field Values

MULE_MODEL_EXCEPTION_STRATEGY_BEAN_NAME

public static final java.lang.String MULE_MODEL_EXCEPTION_STRATEGY_BEAN_NAME
See Also:
Constant Field Values
Constructor Detail

AutowireUMOManagerFactoryBean

public AutowireUMOManagerFactoryBean()
                              throws java.lang.Exception
Method Detail

getObject

public java.lang.Object getObject()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getObjectType

public java.lang.Class getObjectType()

isSingleton

public boolean isSingleton()

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Throws:
BeansException

createModel

protected void createModel()

setContainerContext

protected void setContainerContext(java.util.Map containers)

setMessageEndpoints

protected void setMessageEndpoints(java.util.Map endpoints)
                            throws InitialisationException
Throws:
InitialisationException

setAgents

protected void setAgents(java.util.Collection agents)
                  throws UMOException
Throws:
UMOException

setProperties

protected void setProperties(java.util.Map props)

setConnectors

protected void setConnectors(java.util.Collection connectors)
                      throws UMOException
Throws:
UMOException

setTransformers

protected void setTransformers(java.util.Collection transformers)
                        throws InitialisationException
Throws:
InitialisationException

setProviders

protected void setProviders(java.util.Collection endpoints)
                     throws InitialisationException
Throws:
InitialisationException

setComponents

protected void setComponents(java.util.Collection components)
                      throws UMOException
Throws:
UMOException

setInterceptorStacks

protected void setInterceptorStacks(java.util.Map stacks)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.