org.mule.impl
Class MuleDescriptor

java.lang.Object
  extended by org.mule.impl.ImmutableMuleDescriptor
      extended by org.mule.impl.MuleDescriptor
All Implemented Interfaces:
Initialisable, UMODescriptor, UMOImmutableDescriptor

public class MuleDescriptor
extends ImmutableMuleDescriptor
implements UMODescriptor

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


Field Summary
static String DEFAULT_INSTANCE_REF_NAME
           
 
Fields inherited from class org.mule.impl.ImmutableMuleDescriptor
container, containerManaged, encoding, exceptionListener, implementationReference, inboundEndpoint, inboundRouter, inboundTransformer, INITIAL_STATE_PAUSED, INITIAL_STATE_STARTED, INITIAL_STATE_STOPPED, initialisationCallbacks, initialState, intecerptorList, modelName, MULE_PROPERTY_DOT_PROPERTIES, name, nestedRouter, outboundEndpoint, outboundRouter, outboundTransformer, poolingProfile, properties, queueProfile, responseRouter, responseTransformer, singleton, threadingProfile, version
 
Constructor Summary
MuleDescriptor()
          Default constructor.
MuleDescriptor(MuleDescriptor descriptor)
           
MuleDescriptor(String name)
           
 
Method Summary
 void addInitialisationCallback(InitialisationCallback callback)
           
 void addInterceptor(UMOInterceptor inteceptor)
          Interceptors are executable objects that can be chained together.
 void setContainer(String containerName)
          Sets the name of the contaier where the object for this descriptor resides.
 void setContainerManaged(boolean value)
           
 void setEncoding(String encoding)
           
 void setExceptionListener(ExceptionListener listener)
          The exception strategy to use to handle exceptions in the Mule UMO.
 void setImplementation(Object reference)
          The String used to instanciate create the object, this can be a FQ class name or a reference to an object in a configured container
 void setImplementationInstance(Object instance)
           
 void setInboundEndpoint(UMOEndpoint endpoint)
          The inbound endpointUri to use when receiveing an event.
 void setInboundRouter(UMOInboundRouterCollection router)
          Inbound Routers control how events are received by a component.
 void setInboundTransformer(UMOTransformer transformer)
           
 void setInitialState(String state)
          Sets the initial state of this component
 void setInterceptors(List inteceptorList)
          Interceptors are executable objects that can be chained together.
 void setModelName(String modelName)
          Sets the Model name that this descriptor is registered within.
 void setName(String newName)
          sets the identifier for the Mule UMO created from the descriptor
 void setNestedRouter(UMONestedRouterCollection router)
           
 void setOutboundEndpoint(UMOEndpoint endpoint)
          The outbound Provider to use when sending an event.
 void setOutboundRouter(UMOOutboundRouterCollection router)
          Outbound Routers control how events are published by a component once.
 void setOutboundTransformer(UMOTransformer transformer)
          The transformer to use when sending events or data.
 void setPoolingProfile(PoolingProfile poolingProfile)
           
 void setProperties(Map props)
           
 void setQueueProfile(QueueProfile queueProfile)
           
 void setResponseRouter(UMOResponseRouterCollection router)
          Response Routers control how events are returned in a request/response call.
 void setResponseTransformer(UMOTransformer transformer)
           
 void setSingleton(boolean singleton)
          Determines if only a single instance of this component is created.
 void setThreadingProfile(ThreadingProfile threadingProfile)
           
 void setVersion(String ver)
          The version on the Mule UMO.
 
Methods inherited from class org.mule.impl.ImmutableMuleDescriptor
fireInitialisationCallbacks, getContainer, getEncoding, getExceptionListener, getImplementation, getImplementationClass, getImplementationForReference, getInboundEndpoint, getInboundRouter, getInboundTransformer, getInitialState, getInterceptors, getModelName, getName, getNestedRouter, getOutboundEndpoint, getOutboundRouter, getOutboundTransformer, getPoolingProfile, getProperties, getQueueProfile, getResponseRouter, getResponseTransformer, getThreadingProfile, getVersion, initialise, isContainerManaged, isSingleton, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.umo.UMOImmutableDescriptor
getContainer, getEncoding, getExceptionListener, getImplementation, getImplementationClass, getInboundEndpoint, getInboundRouter, getInboundTransformer, getInitialState, getInterceptors, getModelName, getName, getNestedRouter, getOutboundEndpoint, getOutboundRouter, getOutboundTransformer, getProperties, getResponseRouter, getResponseTransformer, getVersion, isSingleton
 
Methods inherited from interface org.mule.umo.lifecycle.Initialisable
initialise
 

Field Detail

DEFAULT_INSTANCE_REF_NAME

public static final String DEFAULT_INSTANCE_REF_NAME
See Also:
Constant Field Values
Constructor Detail

MuleDescriptor

public MuleDescriptor(String name)

MuleDescriptor

public MuleDescriptor(MuleDescriptor descriptor)

MuleDescriptor

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

See Also:
MuleConfiguration
Method Detail

setThreadingProfile

public void setThreadingProfile(ThreadingProfile threadingProfile)

setExceptionListener

public void setExceptionListener(ExceptionListener listener)
Description copied from interface: UMODescriptor
The exception strategy to use to handle exceptions in the Mule UMO.

Specified by:
setExceptionListener in interface UMODescriptor
Parameters:
listener - the exception strategy to use. If none has been set or argument is null a default

setName

public void setName(String newName)
Description copied from interface: UMODescriptor
sets the identifier for the Mule UMO created from the descriptor

Specified by:
setName in interface UMODescriptor
Parameters:
newName - the identifier for the Mule UMO created from the descriptor

setOutboundTransformer

public void setOutboundTransformer(UMOTransformer transformer)
Description copied from interface: UMODescriptor
The transformer to use when sending events or data.

Specified by:
setOutboundTransformer in interface UMODescriptor
Parameters:
transformer - the transformer to use.
See Also:
UMOTransformer, AbstractTransformer

setResponseTransformer

public void setResponseTransformer(UMOTransformer transformer)

setProperties

public void setProperties(Map props)
Specified by:
setProperties in interface UMODescriptor
Parameters:
props - the properties for the descriptor. These will be passed to the UMO when it's initialise method is called or set as bean properties whe the UMO is created

setVersion

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

Specified by:
setVersion in interface UMODescriptor
Parameters:
ver - the version of the Mule descriptor

setInboundEndpoint

public void setInboundEndpoint(UMOEndpoint endpoint)
                        throws MuleException
Description copied from interface: UMODescriptor
The inbound endpointUri to use when receiveing an event.

Specified by:
setInboundEndpoint in interface UMODescriptor
Parameters:
endpoint - the inbound endpoint to use
Throws:
MuleException - if the Provider is not valid i.e. the proivder is not a receiver
See Also:
UMOEndpoint

setOutboundEndpoint

public void setOutboundEndpoint(UMOEndpoint endpoint)
                         throws MuleException
Description copied from interface: UMODescriptor
The outbound Provider to use when sending an event.

Specified by:
setOutboundEndpoint in interface UMODescriptor
Parameters:
endpoint - the outbound endpoint to use
Throws:
MuleException - if the Provider is not valid i.e. the proivder is a receiver
See Also:
UMOEndpoint

setInboundTransformer

public void setInboundTransformer(UMOTransformer transformer)
Specified by:
setInboundTransformer in interface UMODescriptor
Parameters:
transformer - the transformer to use.
See Also:
UMOTransformer, AbstractTransformer

addInterceptor

public void addInterceptor(UMOInterceptor inteceptor)
Description copied from interface: UMODescriptor
Interceptors are executable objects that can be chained together. Interceptors are executed in the order they are added, for example if INTERCEPTOR_1 is added and then INTERCEPTOR_2 is added to UMO_A the execution order will be: INTERCEPTOR_1 -> INTERCEPTOR_2 -> UMO_A.

Specified by:
addInterceptor in interface UMODescriptor
Parameters:
inteceptor - the interceptor to add.

setInterceptors

public void setInterceptors(List inteceptorList)
Description copied from interface: UMODescriptor
Interceptors are executable objects that can be chained together. Interceptors are executed in the order they are added, for example if INTERCEPTOR_1 is added and then INTERCEPTOR_2 is added to UMO_A the execution order will be: INTERCEPTOR_1 -> INTERCEPTOR_2 -> UMO_A.

Specified by:
setInterceptors in interface UMODescriptor
Parameters:
inteceptorList - A list of interceptors to associate.

setPoolingProfile

public void setPoolingProfile(PoolingProfile poolingProfile)

setQueueProfile

public void setQueueProfile(QueueProfile queueProfile)

setImplementation

public void setImplementation(Object reference)
Description copied from interface: UMODescriptor
The String used to instanciate create the object, this can be a FQ class name or a reference to an object in a configured container

Specified by:
setImplementation in interface UMODescriptor
Parameters:
reference - The String object reference

setImplementationInstance

public void setImplementationInstance(Object instance)

setInboundRouter

public void setInboundRouter(UMOInboundRouterCollection router)
Description copied from interface: UMODescriptor
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:
setInboundRouter in interface UMODescriptor
Parameters:
router - the inbound router for this component
See Also:
UMOInboundRouterCollection

setOutboundRouter

public void setOutboundRouter(UMOOutboundRouterCollection router)
Description copied from interface: UMODescriptor
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:
setOutboundRouter in interface UMODescriptor
Parameters:
router - the outbound router for this component
See Also:
UMOOutboundRouterCollection

setNestedRouter

public void setNestedRouter(UMONestedRouterCollection router)
Specified by:
setNestedRouter in interface UMODescriptor

setContainerManaged

public void setContainerManaged(boolean value)

addInitialisationCallback

public void addInitialisationCallback(InitialisationCallback callback)

setResponseRouter

public void setResponseRouter(UMOResponseRouterCollection router)
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:
setResponseRouter in interface UMODescriptor
Parameters:
router - the response router for this component
See Also:
UMOResponseRouterCollection

setSingleton

public void setSingleton(boolean singleton)
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:
setSingleton in interface UMODescriptor
Parameters:
singleton - true if this component is a singleton

setInitialState

public void setInitialState(String state)
Sets the initial state of this component

Specified by:
setInitialState in interface UMODescriptor
Parameters:
state - the initial state of this component
See Also:
ImmutableMuleDescriptor.INITIAL_STATE_STARTED, ImmutableMuleDescriptor.INITIAL_STATE_STOPPED, ImmutableMuleDescriptor.INITIAL_STATE_PAUSED

setEncoding

public void setEncoding(String encoding)
Specified by:
setEncoding in interface UMODescriptor

setContainer

public void setContainer(String containerName)
Sets 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:
setContainer in interface UMODescriptor
Parameters:
containerName - the container name, or null if it is not known - in which case each container will be queried for the component implementation.

setModelName

public void setModelName(String modelName)
Description copied from interface: UMODescriptor
Sets the Model name that this descriptor is registered within.

Specified by:
setModelName in interface UMODescriptor
Parameters:
modelName - name of the model


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