public abstract class AbstractModel extends Object implements Model
MuleModel is the default implementation of the Model. The model
encapsulates and manages the runtime behaviour of a Mule Server instance. It is
responsible for maintaining the UMOs instances and their configuration.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_MODEL_NAME |
protected org.apache.commons.logging.Log |
logger |
protected MuleContext |
muleContext |
PHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
AbstractModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Destroys any current components
|
EntryPointResolverSet |
getEntryPointResolverSet()
The entry point resolver is used to determine the method to be called on a
service when an event is received for it.
|
ExceptionListener |
getExceptionListener()
The exception strategy to use by components managed by the model.
|
LifecycleAdapterFactory |
getLifecycleAdapterFactory()
The lifecycle adapter is used by the model to translate Mule lifecycle event
to events that UMO components registered with the model understand.
|
String |
getName()
Gts the name of the object
|
void |
initialise()
Method used to perform any initialisation work.
|
void |
setEntryPointResolvers(Collection entryPointResolvers)
This allows us to configure entry point resolvers incrementally
|
void |
setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
This will be used to build entry points on the components registered with the
model.
|
void |
setExceptionListener(ExceptionListener exceptionListener)
The exception strategy to use by components managed by the model.
|
void |
setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
Sets the lifecycleAdapterFactory on the model.
|
void |
setMuleContext(MuleContext context) |
void |
setName(String name)
Sets the name of the object
|
void |
start()
Starts all registered components
|
void |
stop()
Stops any registered components
|
public static final String DEFAULT_MODEL_NAME
protected transient org.apache.commons.logging.Log logger
protected MuleContext muleContext
public String getName()
NamedObjectgetName in interface NamedObjectpublic void setName(String name)
NamedObjectsetName in interface NamedObjectname - the name of the objectpublic EntryPointResolverSet getEntryPointResolverSet()
ModelgetEntryPointResolverSet in interface Modelpublic void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
ModelsetEntryPointResolverSet in interface ModelentryPointResolverSet - The entryPointResolver to set. This will be used to
build entry points on the components registered with the model.public void setEntryPointResolvers(Collection entryPointResolvers)
entryPointResolvers - Resolvers to addpublic LifecycleAdapterFactory getLifecycleAdapterFactory()
ModelLifecycleAdapterFactory is used by the model to instanciate
LifecycleAdapters.getLifecycleAdapterFactory in interface ModelLifecycleAdapterFactory,
LifecycleAdapterpublic void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
ModelsetLifecycleAdapterFactory in interface ModellifecycleAdapterFactory - The lifecycleAdapterFactory to set on this
model.LifecycleAdapterFactory,
LifecycleAdapterpublic void dispose()
dispose in interface Disposablepublic void stop()
throws MuleException
stop in interface StoppableMuleException - if a Service fails tcomponentpublic void start()
throws MuleException
start in interface StartableMuleException - if any of the components fail to startpublic void initialise()
throws InitialisationException
InitialisableInitialisationException 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.initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic ExceptionListener getExceptionListener()
ModelgetExceptionListener in interface ModelExceptionListenerpublic void setExceptionListener(ExceptionListener exceptionListener)
ModelsetExceptionListener in interface ModelexceptionListener - the default exception strategy for this model.ExceptionListenerpublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwareCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.