|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mule.impl.model.AbstractModel
MuleModel is the default implementation of the UMOModel. The model
encapsulates and manages the runtime behaviour of a Mule Server instance. It is
responsible for maintaining the UMOs instances and their configuration.
| Field Summary | |
protected Map |
descriptors
Collection for mule descriptors registered in this Manager |
protected Log |
logger
logger used by this class |
| Constructor Summary | |
AbstractModel()
Default constructor |
|
| Method Summary | |
protected abstract UMOComponent |
createComponent(UMODescriptor descriptor)
|
void |
dispose()
Destroys any current components |
UMOComponent |
getComponent(String name)
Returns the UMOComponent object for the given component name |
Iterator |
getComponentNames()
Gets an iterator of all component names registered in the model |
UMOSession |
getComponentSession(String muleName)
Returns a valid component for the given Mule name |
UMODescriptor |
getDescriptor(String name)
Returns a descriptor for the given component name |
UMOEntryPointResolver |
getEntryPointResolver()
The entry point resolver is used to determine the method to be called on a component when an event is received for it. |
ExceptionListener |
getExceptionListener()
The exception strategy to use by components managed by the model. |
UMOLifecycleAdapterFactory |
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()
The model's name. |
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isComponentRegistered(String name)
Determines if a UMO component descriptor by the given name is regestered with the model |
void |
pauseComponent(String name)
Pauses event processing for a single Mule Component. |
UMOComponent |
registerComponent(UMODescriptor descriptor)
Registers a UMODescriptor with the MuleManager. |
void |
resumeComponent(String name)
Resumes a single Mule Component that has been paused. |
void |
setComponents(List descriptors)
A convenience method to set a list of components on the model. |
void |
setEntryPointResolver(UMOEntryPointResolver entryPointResolver)
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(UMOLifecycleAdapterFactory lifecycleAdapterFactory)
Sets the lifecycleAdapterFactory on the model. |
void |
setName(String name)
Sets the model's name. |
void |
start()
Starts all registered components |
void |
startComponent(String name)
Starts a single Mule Component. |
void |
stop()
Stops any registered components |
void |
stopComponent(String name)
Stops a single Mule Component. |
void |
unregisterComponent(UMODescriptor descriptor)
Unregisters a component From the model |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mule.umo.model.UMOModel |
getType |
| Field Detail |
protected transient Log logger
protected Map descriptors
| Constructor Detail |
public AbstractModel()
| Method Detail |
public String getName()
UMOModel
getName in interface UMOModelpublic void setName(String name)
UMOModel
setName in interface UMOModelname - the model's namepublic UMOEntryPointResolver getEntryPointResolver()
UMOModel
getEntryPointResolver in interface UMOModelpublic void setEntryPointResolver(UMOEntryPointResolver entryPointResolver)
UMOModel
setEntryPointResolver in interface UMOModelentryPointResolver - The entryPointResolver to set. This will be used to
build entry points on the components registered with the model.public boolean isComponentRegistered(String name)
UMOModel
isComponentRegistered in interface UMOModelname - the name of the UMO
UMODescriptor
public UMOComponent registerComponent(UMODescriptor descriptor)
throws UMOException
UMOModelUMODescriptor with the MuleManager.
The manager will take care of creating the Mule UMO and, it's component and
proxies.
registerComponent in interface UMOModeldescriptor - the UMODescriptor to register
UMOException
public void unregisterComponent(UMODescriptor descriptor)
throws UMOException
UMOModel
unregisterComponent in interface UMOModeldescriptor - the descriptor of the componnt to remove
UMOException - if the component is not registered or it failed to be
disposing or the descriptor is nullpublic UMOLifecycleAdapterFactory getLifecycleAdapterFactory()
UMOModelUMOLifecycleAdapterFactory is used by the model to instanciate
LifecycleAdapters.
getLifecycleAdapterFactory in interface UMOModelUMOLifecycleAdapterFactory,
UMOLifecycleAdapterpublic void setLifecycleAdapterFactory(UMOLifecycleAdapterFactory lifecycleAdapterFactory)
UMOModel
setLifecycleAdapterFactory in interface UMOModellifecycleAdapterFactory - The lifecycleAdapterFactory to set on this
model.UMOLifecycleAdapterFactory,
UMOLifecycleAdapterpublic void dispose()
dispose in interface Disposablepublic UMOSession getComponentSession(String muleName)
getComponentSession in interface UMOModelmuleName - the Name of the Mule for which the component is required
public void stop()
throws UMOException
stop in interface StoppableUMOException - if a Component fails tcomponent
public void start()
throws UMOException
start in interface StartableUMOException - if any of the components fail to start
public void startComponent(String name)
throws UMOException
startComponent in interface UMOModelname - the name of the Mule UMO to start
UMOException - if the MuleUMO is not registered or the component failed
to start
public void stopComponent(String name)
throws UMOException
stopComponent in interface UMOModelname - the name of the Mule UMO to stop
UMOException - if the MuleUMO is not registered
public void pauseComponent(String name)
throws UMOException
pauseComponent in interface UMOModelname - the name of the Mule UMO to stop
UMOException - if the MuleUMO is not registered or the
component failed to pause.MuleConfiguration
public void resumeComponent(String name)
throws UMOException
resumeComponent in interface UMOModelname - the name of the Mule UMO to resume
UMOException - if the MuleUMO is not registered or the
component failed to resume
public void setComponents(List descriptors)
throws UMOException
UMOModel
setComponents in interface UMOModeldescriptors -
UMOException
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 shutdownpublic ExceptionListener getExceptionListener()
UMOModel
getExceptionListener in interface UMOModelExceptionListenerpublic void setExceptionListener(ExceptionListener exceptionListener)
UMOModel
setExceptionListener in interface UMOModelexceptionListener - the default exception strategy for this model.ExceptionListenerpublic UMODescriptor getDescriptor(String name)
UMOModel
getDescriptor in interface UMOModelname - the name of the component
UMODescriptorpublic UMOComponent getComponent(String name)
UMOModel
getComponent in interface UMOModelname - the name of the component
UMOComponentpublic Iterator getComponentNames()
getComponentNames in interface UMOModelprotected abstract UMOComponent createComponent(UMODescriptor descriptor)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||