|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.model.AbstractModel
public abstract class AbstractModel
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.
Field Summary | |
---|---|
static String |
DEFAULT_MODEL_NAME
|
protected ModelLifecycleManager |
lifecycleManager
|
protected Log |
logger
|
protected MuleContext |
muleContext
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Startable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Stoppable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
AbstractModel()
|
Method Summary | |
---|---|
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. |
MessagingExceptionHandler |
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 components registered with the model understand. |
LifecycleState |
getLifecycleState()
|
MuleContext |
getMuleContext()
|
String |
getName()
Gets the name of the object |
void |
initialise()
Method used to perform any initialisation work. |
void |
setEntryPointResolvers(Collection<EntryPointResolver> 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(MessagingExceptionHandler 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 |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.mule.api.model.Model |
---|
getType |
Field Detail |
---|
public static final String DEFAULT_MODEL_NAME
protected MuleContext muleContext
protected transient Log logger
protected ModelLifecycleManager lifecycleManager
Constructor Detail |
---|
public AbstractModel()
Method Detail |
---|
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 shutdown
RecoverableException
- 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()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |