@Deprecated 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 service instances and their configuration.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MODEL_NAME
Deprecated.
|
protected ModelLifecycleManager |
lifecycleManager
Deprecated.
|
protected Log |
logger
Deprecated.
|
protected MuleContext |
muleContext
Deprecated.
|
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractModel()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Deprecated.
Destroys any current components
|
EntryPointResolverSet |
getEntryPointResolverSet()
Deprecated.
The entry point resolver is used to determine the method to be called on a
service when an event is received for it.
|
MessagingExceptionHandler |
getExceptionListener()
Deprecated.
The exception strategy to use by components managed by the model.
|
LifecycleAdapterFactory |
getLifecycleAdapterFactory()
Deprecated.
The lifecycle adapter is used by the model to translate Mule lifecycle event
to events that components registered with the model understand.
|
LifecycleState |
getLifecycleState()
Deprecated.
|
MuleContext |
getMuleContext()
Deprecated.
|
String |
getName()
Deprecated.
Gets the name of the object
|
void |
initialise()
Deprecated.
Method used to perform any initialisation work.
|
void |
setEntryPointResolvers(Collection<EntryPointResolver> entryPointResolvers)
Deprecated.
This allows us to configure entry point resolvers incrementally
|
void |
setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
Deprecated.
This will be used to build entry points on the components registered with the
model.
|
void |
setExceptionListener(MessagingExceptionHandler exceptionListener)
Deprecated.
The exception strategy to use by components managed by the model.
|
void |
setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
Deprecated.
Sets the lifecycleAdapterFactory on the model.
|
void |
setMuleContext(MuleContext context)
Deprecated.
|
void |
setName(String name)
Deprecated.
Sets the name of the object
|
void |
start()
Deprecated.
Starts all registered components
|
void |
stop()
Deprecated.
Stops any registered components
|
String |
toString()
Deprecated.
|
public static final String DEFAULT_MODEL_NAME
protected MuleContext muleContext
protected transient Log logger
protected ModelLifecycleManager lifecycleManager
public String getName()
NamedObject
getName
in interface NamedObject
public void setName(String name)
NameableObject
setName
in interface NameableObject
name
- the name of the objectpublic LifecycleState getLifecycleState()
getLifecycleState
in interface LifecycleStateEnabled
public EntryPointResolverSet getEntryPointResolverSet()
Model
getEntryPointResolverSet
in interface Model
public void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
Model
setEntryPointResolverSet
in interface Model
entryPointResolverSet
- The entryPointResolver to set. This will be used to
build entry points on the components registered with the model.public void setEntryPointResolvers(Collection<EntryPointResolver> entryPointResolvers)
entryPointResolvers
- Resolvers to addpublic LifecycleAdapterFactory getLifecycleAdapterFactory()
Model
LifecycleAdapterFactory
is used by the model to instanciate
LifecycleAdapters.getLifecycleAdapterFactory
in interface Model
LifecycleAdapterFactory
,
LifecycleAdapter
public void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)
Model
setLifecycleAdapterFactory
in interface Model
lifecycleAdapterFactory
- The lifecycleAdapterFactory to set on this
model.LifecycleAdapterFactory
,
LifecycleAdapter
public void dispose()
dispose
in interface Disposable
public void stop() throws MuleException
stop
in interface Stoppable
MuleException
- if a Service fails tcomponentpublic void start() throws MuleException
start
in interface Startable
MuleException
- if any of the components fail to startpublic void initialise() throws InitialisationException
Initialisable
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.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic MessagingExceptionHandler getExceptionListener()
Model
getExceptionListener
in interface Model
MessagingExceptionHandler
public void setExceptionListener(MessagingExceptionHandler exceptionListener)
Model
setExceptionListener
in interface Model
exceptionListener
- the default exception strategy for this model.MessagingExceptionHandler
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public MuleContext getMuleContext()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.