org.mule.impl
Class ImmutableMuleDescriptor

java.lang.Object
  extended byorg.mule.impl.ImmutableMuleDescriptor
All Implemented Interfaces:
Initialisable, UMOImmutableDescriptor
Direct Known Subclasses:
MuleDescriptor

public class ImmutableMuleDescriptor
extends Object
implements UMOImmutableDescriptor

MuleDescriptor describes all the properties for a Mule UMO. New Mule UMOs can be initialised as needed from their descriptor.


Field Summary
protected  String container
          The name of the container that the component implementation resides in If null, the container is not known, if 'none' the component is instanciated from its implementation class name.
protected  boolean containerManaged
          Deprecated. Use container instead.
protected  String encoding
           
protected  ExceptionListener exceptionListener
          holds the exception stategy for this UMO
protected  Object implementationReference
          The implementationReference used to create the Object UMO instance.
protected  UMOEndpoint inboundEndpoint
          Deprecated. Please use inboundRouter instead.
protected  UMOInboundRouterCollection inboundRouter
           
protected  UMOTransformer inboundTransformer
          Deprecated. Please use inboundRouter instead.
static String INITIAL_STATE_PAUSED
           
static String INITIAL_STATE_STARTED
           
static String INITIAL_STATE_STOPPED
          The initial states that the component can be started in
protected  List initialisationCallbacks
           
protected  String initialState
          Determines the initial state of this component when the model starts.
protected  List intecerptorList
          A list of UMOinteceptors that will be executed when the Mule UMO executed
protected  String modelName
           
protected static String MULE_PROPERTY_DOT_PROPERTIES
          Property that allows for a property file to be used to load properties instead of listing them directly in the mule-configuration file
protected  String name
          The descriptor name
protected  UMONestedRouterCollection nestedRouter
           
protected  UMOEndpoint outboundEndpoint
          Deprecated. Please use outboundRouter instead.
protected  UMOOutboundRouterCollection outboundRouter
           
protected  UMOTransformer outboundTransformer
          Deprecated. Please use outboundRouter instead.
protected  PoolingProfile poolingProfile
          the pooling configuration used when initialising the component described by this descriptor.
protected  Map properties
          The properties for the Mule UMO.
protected  QueueProfile queueProfile
          The queuing profile for events received for this component
protected  UMOResponseRouterCollection responseRouter
           
protected  UMOTransformer responseTransformer
          Deprecated. Please use responseRouter instead.
protected  boolean singleton
          Determines if this component is a singleton
protected  ThreadingProfile threadingProfile
          The threading profile to use for this component.
protected  String version
          The descriptors version
 
Constructor Summary
protected ImmutableMuleDescriptor()
          Default constructor used by mutable versions of this class to provide defaults for certain properties
  ImmutableMuleDescriptor(ImmutableMuleDescriptor descriptor)
          Default constructor.
 
Method Summary
 void fireInitialisationCallbacks(Object component)
           
 String getContainer()
          Returns the name of the contaier where the object for this descriptor resides.
 String getEncoding()
           
 ExceptionListener getExceptionListener()
          The exception strategy to use to handle exceptions in the Mule UMO.
 Object getImplementation()
          String used to instansiate the object, this can be a class name or a reference to an object in a container
 Class getImplementationClass()
          Class used to instansiate the object, this can be a class name or a reference to an object in a container
protected  Class getImplementationForReference(String reference)
          A helper method that will resolved a component for a given reference id.
 UMOEndpoint getInboundEndpoint()
          The inbound Provider to use when receiveing an event.
 UMOInboundRouterCollection getInboundRouter()
          Inbound Routers control how events are received by a component.
 UMOTransformer getInboundTransformer()
          The transformer to use when receiving events or data.
 String getInitialState()
          Returns the initial state of this component
 List getInterceptors()
          Returns a list of interceptor objects that will be executed before/after the Mule UMO has executed
 String getModelName()
          Returns the name of the model that this descriptor is registered with.
 String getName()
          Gets the identifier for the Mule UMO created from the descriptor
 UMONestedRouterCollection getNestedRouter()
           
 UMOEndpoint getOutboundEndpoint()
          The outbound Provider to use when sending an event.
 UMOOutboundRouterCollection getOutboundRouter()
          Outbound Routers control how events are published by a component once.
 UMOTransformer getOutboundTransformer()
          The transformer to use when sending events or data.
 PoolingProfile getPoolingProfile()
           
 Map getProperties()
          Returns any properties configured on this descriptor.
 QueueProfile getQueueProfile()
           
 UMOResponseRouterCollection getResponseRouter()
          Response Routers control how events are returned in a request/response call.
 UMOTransformer getResponseTransformer()
          The transformer to use when sending events or data back as a response.
 ThreadingProfile getThreadingProfile()
          The threading profile used by the UMO when managing a component.
 String getVersion()
          The version on the Mule UMO.
 void initialise()
          Method used to perform any initialisation work.
 boolean isContainerManaged()
           
 boolean isSingleton()
          Determines if only a single instance of this component is created.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INITIAL_STATE_STOPPED

public static final String INITIAL_STATE_STOPPED
The initial states that the component can be started in

See Also:
Constant Field Values

INITIAL_STATE_STARTED

public static final String INITIAL_STATE_STARTED
See Also:
Constant Field Values

INITIAL_STATE_PAUSED

public static final String INITIAL_STATE_PAUSED
See Also:
Constant Field Values

MULE_PROPERTY_DOT_PROPERTIES

protected static final String MULE_PROPERTY_DOT_PROPERTIES
Property that allows for a property file to be used to load properties instead of listing them directly in the mule-configuration file

See Also:
Constant Field Values

exceptionListener

protected ExceptionListener exceptionListener
holds the exception stategy for this UMO


implementationReference

protected Object implementationReference
The implementationReference used to create the Object UMO instance. Can either be a string such as a container reference or classname or can be an instance of the implementation.


name

protected String name
The descriptor name


properties

protected Map properties
The properties for the Mule UMO.


version

protected String version
The descriptors version


intecerptorList

protected List intecerptorList
A list of UMOinteceptors that will be executed when the Mule UMO executed


inboundRouter

protected UMOInboundRouterCollection inboundRouter

outboundRouter

protected UMOOutboundRouterCollection outboundRouter

nestedRouter

protected UMONestedRouterCollection nestedRouter

responseRouter

protected UMOResponseRouterCollection responseRouter

modelName

protected String modelName

inboundEndpoint

protected UMOEndpoint inboundEndpoint
Deprecated. Please use inboundRouter instead.

The default receive endpoint.

See Also:
MULE-506

inboundTransformer

protected UMOTransformer inboundTransformer
Deprecated. Please use inboundRouter instead.

The transformer for the default receive endpoint.

See Also:
MULE-506

outboundEndpoint

protected UMOEndpoint outboundEndpoint
Deprecated. Please use outboundRouter instead.

The default send endpoint.

See Also:
MULE-506

outboundTransformer

protected UMOTransformer outboundTransformer
Deprecated. Please use outboundRouter instead.

The transformer for the default send Endpoint

See Also:
MULE-506

responseTransformer

protected UMOTransformer responseTransformer
Deprecated. Please use responseRouter instead.

The transformer for the response

See Also:
MULE-506

threadingProfile

protected ThreadingProfile threadingProfile
The threading profile to use for this component. If this is not set a default will be provided by the server


poolingProfile

protected PoolingProfile poolingProfile
the pooling configuration used when initialising the component described by this descriptor.


queueProfile

protected QueueProfile queueProfile
The queuing profile for events received for this component


containerManaged

protected boolean containerManaged
Deprecated. Use container instead.

Determines whether the component described by this descriptor is hosted in a container. If the value is false the component will not be pooled by Mule.

See Also:
MULE-812

initialState

protected String initialState
Determines the initial state of this component when the model starts. Can be 'stopped' or 'started' (default)


singleton

protected boolean singleton
Determines if this component is a singleton


initialisationCallbacks

protected List initialisationCallbacks

encoding

protected String encoding

container

protected String container
The name of the container that the component implementation resides in If null, the container is not known, if 'none' the component is instanciated from its implementation class name.

Constructor Detail

ImmutableMuleDescriptor

public ImmutableMuleDescriptor(ImmutableMuleDescriptor descriptor)
Default constructor. Initalises common properties for the MuleConfiguration object

See Also:
MuleConfiguration

ImmutableMuleDescriptor

protected ImmutableMuleDescriptor()
Default constructor used by mutable versions of this class to provide defaults for certain properties

Method Detail

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown

getExceptionListener

public ExceptionListener getExceptionListener()
Description copied from interface: UMOImmutableDescriptor
The exception strategy to use to handle exceptions in the Mule UMO.

Specified by:
getExceptionListener in interface UMOImmutableDescriptor
Returns:
the exception strategy to use. If none has been set a default will be used.

getInboundTransformer

public UMOTransformer getInboundTransformer()
Description copied from interface: UMOImmutableDescriptor
The transformer to use when receiving events or data.

Specified by:
getInboundTransformer in interface UMOImmutableDescriptor
Returns:
the Inbound transformer to use

getName

public String getName()
Description copied from interface: UMOImmutableDescriptor
Gets the identifier for the Mule UMO created from the descriptor

Specified by:
getName in interface UMOImmutableDescriptor
Returns:
the identifier for the Mule UMO created from the descriptor

getOutboundTransformer

public UMOTransformer getOutboundTransformer()
Description copied from interface: UMOImmutableDescriptor
The transformer to use when sending events or data.

Specified by:
getOutboundTransformer in interface UMOImmutableDescriptor
Returns:
the Outbound transformer to use

getResponseTransformer

public UMOTransformer getResponseTransformer()
Description copied from interface: UMOImmutableDescriptor
The transformer to use when sending events or data back as a response.

Specified by:
getResponseTransformer in interface UMOImmutableDescriptor
Returns:
the response transformer to use

getProperties

public Map getProperties()
Description copied from interface: UMOImmutableDescriptor
Returns any properties configured on this descriptor.

Specified by:
getProperties in interface UMOImmutableDescriptor
Returns:
properties defined for the descriptor.

getVersion

public String getVersion()
Description copied from interface: UMOImmutableDescriptor
The version on the Mule UMO. This is currently not used by the mule run-time but may be used in future.

Specified by:
getVersion in interface UMOImmutableDescriptor
Returns:
the Descriptor Version

getInterceptors

public List getInterceptors()
Description copied from interface: UMOImmutableDescriptor
Returns a list of interceptor objects that will be executed before/after the Mule UMO has executed

Specified by:
getInterceptors in interface UMOImmutableDescriptor
Returns:
a list of interceptor objects that will be executed before/after the Mule UMO has executed

getEncoding

public String getEncoding()
Specified by:
getEncoding in interface UMOImmutableDescriptor

toString

public String toString()

getImplementation

public Object getImplementation()
Description copied from interface: UMOImmutableDescriptor
String used to instansiate the object, this can be a class name or a reference to an object in a container

Specified by:
getImplementation in interface UMOImmutableDescriptor
Returns:
the Object's class r reference name or an instance of the object to use

getInboundRouter

public UMOInboundRouterCollection getInboundRouter()
Description copied from interface: UMOImmutableDescriptor
Inbound Routers control how events are received by a component. If no router is set. A default will be used that uses the inboundProvider set on his descriptor.

Specified by:
getInboundRouter in interface UMOImmutableDescriptor
Returns:
the inbound router for this component. This will always return a valid router.
See Also:
UMOInboundRouterCollection

getOutboundRouter

public UMOOutboundRouterCollection getOutboundRouter()
Description copied from interface: UMOImmutableDescriptor
Outbound Routers control how events are published by a component once. the event has been processed. If no router is set. A default will be used that uses the outboundProvider set on his descriptor to route the event.

Specified by:
getOutboundRouter in interface UMOImmutableDescriptor
Returns:
the outbound router for this component
See Also:
UMOOutboundRouterCollection

getNestedRouter

public UMONestedRouterCollection getNestedRouter()
Specified by:
getNestedRouter in interface UMOImmutableDescriptor

getThreadingProfile

public ThreadingProfile getThreadingProfile()
The threading profile used by the UMO when managing a component. Can be used to allocate more or less resources to this particular umo component.


getPoolingProfile

public PoolingProfile getPoolingProfile()

getQueueProfile

public QueueProfile getQueueProfile()

isContainerManaged

public boolean isContainerManaged()

getImplementationClass

public Class getImplementationClass()
                             throws UMOException
Description copied from interface: UMOImmutableDescriptor
Class used to instansiate the object, this can be a class name or a reference to an object in a container

Specified by:
getImplementationClass in interface UMOImmutableDescriptor
Returns:
the Object's class representation
Throws:
UMOException

getImplementationForReference

protected Class getImplementationForReference(String reference)
                                       throws ContainerException
A helper method that will resolved a component for a given reference id. For example, for a component declared in a Spring Application context the id would be the bean id, in Pico the id would be a fully qualified class name.

Parameters:
reference - the reference to use when resolving the component
Returns:
the Implementation of the component
Throws:
ContainerException

fireInitialisationCallbacks

public void fireInitialisationCallbacks(Object component)
                                 throws InitialisationException
Throws:
InitialisationException

getInboundEndpoint

public UMOEndpoint getInboundEndpoint()
The inbound Provider to use when receiveing an event. This may get overidden by the configured behaviour of the inbound router on this component

Specified by:
getInboundEndpoint in interface UMOImmutableDescriptor
Returns:
the inbound endpoint or null if one is not set
See Also:
UMOEndpoint

getOutboundEndpoint

public UMOEndpoint getOutboundEndpoint()
The outbound Provider to use when sending an event. This may get overidden by the configured behaviour of the outbound router on this component

Specified by:
getOutboundEndpoint in interface UMOImmutableDescriptor
Returns:
the outbound endpoint or null if one is not set
See Also:
UMOEndpoint

getResponseRouter

public UMOResponseRouterCollection getResponseRouter()
Description copied from interface: UMOImmutableDescriptor
Response Routers control how events are returned in a request/response call. It cn be use to aggregate response events before returning, thus acting as a Join in a forked process. This can be used to make request/response calls a lot more efficient as independent tasks can be forked, execute concurrently and then join before the request completes

Specified by:
getResponseRouter in interface UMOImmutableDescriptor
Returns:
the response router for this component
See Also:
UMOResponseRouterCollection

isSingleton

public boolean isSingleton()
Description copied from interface: UMOImmutableDescriptor
Determines if only a single instance of this component is created. This is useful when a component hands off event processing to another engine such as Rules processing or Bpel and the processing engine allocates and manages its own threads.

Specified by:
isSingleton in interface UMOImmutableDescriptor
Returns:
true if this component is a singleton

getInitialState

public String getInitialState()
Description copied from interface: UMOImmutableDescriptor
Returns the initial state of this component

Specified by:
getInitialState in interface UMOImmutableDescriptor
Returns:
the initial state of this component

getContainer

public String getContainer()
Returns the name of the contaier where the object for this descriptor resides. If this value is 'none' the 'implementaiton' attributed is expected to be a fully qualified class name that will be instanciated.

Specified by:
getContainer in interface UMOImmutableDescriptor
Returns:
the container name, or null if it is not known - in which case each container will be queried for the component implementation.

getModelName

public String getModelName()
Description copied from interface: UMOImmutableDescriptor
Returns the name of the model that this descriptor is registered with.

Specified by:
getModelName in interface UMOImmutableDescriptor
Returns:
the name of the model that this descriptor is registered with or null if this descriptor has not been registered with a model yet


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.