|
||||||||||
| 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 transient Log logger
protected MuleContext muleContext
protected ModelLifecycleManager lifecycleManager
| Constructor Detail |
|---|
public AbstractModel()
| Method Detail |
|---|
public String getName()
NamedObject
getName in interface NamedObjectpublic void setName(String name)
NamedObject
setName in interface NamedObjectname - the name of the objectpublic LifecycleState getLifecycleState()
getLifecycleState in interface LifecycleStateEnabledpublic EntryPointResolverSet getEntryPointResolverSet()
Model
getEntryPointResolverSet in interface Modelpublic void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)
Model
setEntryPointResolverSet 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<EntryPointResolver> 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)
Model
setLifecycleAdapterFactory in interface ModellifecycleAdapterFactory - The lifecycleAdapterFactory to set on this
model.LifecycleAdapterFactory,
LifecycleAdapterpublic void dispose()
dispose in interface Disposable
public void stop()
throws MuleException
stop in interface StoppableMuleException - if a Service fails tcomponent
public void start()
throws MuleException
start in interface StartableMuleException - if any of the components fail to start
public 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 shutdown
RecoverableException - if an error occurs that can be recovered frompublic MessagingExceptionHandler getExceptionListener()
Model
getExceptionListener in interface ModelMessagingExceptionHandlerpublic void setExceptionListener(MessagingExceptionHandler exceptionListener)
Model
setExceptionListener in interface ModelexceptionListener - the default exception strategy for this model.MessagingExceptionHandlerpublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic 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 | |||||||||