|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.impl.MuleModel
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 ConcurrentHashMap |
descriptors
Collection for mule descriptors registered in this Manager |
Constructor Summary | |
MuleModel()
Default constructor |
Method Summary | |
void |
dispose()
Destroys any current components //* @throws UMOException if the components don't destroy gracefully |
UMOComponentFactory |
getComponentFactory()
Returns the factory used to create component wrappers that are registered on the Model |
java.util.Iterator |
getComponentNames()
Gets an iterator of all component names registered in the model |
UMOSession |
getComponentSession(java.lang.String muleName)
Returns a valid component for the given Mule name |
UMODescriptor |
getDescriptor(java.lang.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. |
java.beans.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. |
java.lang.String |
getName()
The model's name. |
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isComponentRegistered(java.lang.String name)
Determines if a UMO component descriptor by the given name is regestered with the model |
void |
pauseComponent(java.lang.String name)
Pauses event processing for a single Mule Component. |
UMOComponent |
registerComponent(UMODescriptor descriptor)
Registers a UMODescriptor with the MuleManager . |
protected void |
registerListeners(UMOComponent component)
|
void |
resumeComponent(java.lang.String name)
Resumes a single Mule Component that has been paused. |
void |
setComponentFactory(UMOComponentFactory factory)
Sets the factory used to create component wrappers that are registered on the Model |
void |
setComponents(java.util.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(java.beans.ExceptionListener exceptionListener)
The exception strategy to use by components managed by the model. |
void |
setLifecycleAdapterFactory(UMOLifecycleAdapterFactory lifecycleAdapterFactory)
Sets the lifecycleAdapterFactory on the model. |
void |
setListeners(ServerEventManager listeners)
|
void |
setName(java.lang.String name)
Sets the model's name. |
void |
start()
Starts all registered components |
void |
startComponent(java.lang.String name)
Starts a single Mule Component. |
void |
stop()
Stops any registered components |
void |
stopComponent(java.lang.String name)
Stops a single Mule Component. |
void |
unregisterComponent(UMODescriptor descriptor)
Unregisters a component From the model |
protected void |
unregisterListeners(UMOComponent component)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ConcurrentHashMap descriptors
Constructor Detail |
public MuleModel()
Method Detail |
public java.lang.String getName()
UMOModel
getName
in interface UMOModel
public void setName(java.lang.String name)
UMOModel
setName
in interface UMOModel
name
- the model's namepublic UMOEntryPointResolver getEntryPointResolver()
UMOModel
getEntryPointResolver
in interface UMOModel
public void setEntryPointResolver(UMOEntryPointResolver entryPointResolver)
UMOModel
setEntryPointResolver
in interface UMOModel
entryPointResolver
- The entryPointResolver to set. This will be used to build entry points
on the components registered with the model.public boolean isComponentRegistered(java.lang.String name)
UMOModel
isComponentRegistered
in interface UMOModel
name
- the name of the UMO
UMODescriptor
public UMOComponent registerComponent(UMODescriptor descriptor) throws UMOException
UMOModel
UMODescriptor
with the MuleManager
.
The manager will take care of creating the Mule UMO and, it's component
and proxies.
registerComponent
in interface UMOModel
descriptor
- the UMODescriptor
to register
UMOException
public void unregisterComponent(UMODescriptor descriptor) throws UMOException
UMOModel
unregisterComponent
in interface UMOModel
descriptor
- the descriptor of the componnt to remove
UMOException
- if the compoennt is not registered or it failed to be disposing
or the descriptor is nullprotected void registerListeners(UMOComponent component) throws UMOException
UMOException
protected void unregisterListeners(UMOComponent component) throws UMOException
UMOException
public UMOLifecycleAdapterFactory getLifecycleAdapterFactory()
UMOModel
UMOLifecycleAdapterFactory
is used by the
model to instanciate LifecycleAdapters.
getLifecycleAdapterFactory
in interface UMOModel
@UMOLifecycleAdapter
public void setLifecycleAdapterFactory(UMOLifecycleAdapterFactory lifecycleAdapterFactory)
UMOModel
setLifecycleAdapterFactory
in interface UMOModel
lifecycleAdapterFactory
- The lifecycleAdapterFactory to set on this model.UMOLifecycleAdapterFactory
,
UMOLifecycleAdapter
public void dispose()
dispose
in interface Disposable
public UMOSession getComponentSession(java.lang.String muleName)
getComponentSession
in interface UMOModel
muleName
- the Name of the Mule for which the component is required
public void stop() throws UMOException
stop
in interface Stoppable
UMOException
- if a Component fails tcomponentpublic void start() throws UMOException
start
in interface Startable
UMOException
- if any of the components fail to startpublic void stopComponent(java.lang.String name) throws UMOException
stopComponent
in interface UMOModel
name
- the name of the Mule UMO to stop
UMOException
- if the MuleUMO is not registeredpublic void startComponent(java.lang.String name) throws UMOException
startComponent
in interface UMOModel
name
- the name of the Mule UMO to start
UMOException
- if the MuleUMO is not registered or the component failed to startpublic void pauseComponent(java.lang.String name) throws UMOException
pauseComponent
in interface UMOModel
name
- 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(java.lang.String name) throws UMOException
resumeComponent
in interface UMOModel
name
- the name of the Mule UMO to resume
UMOException
- if the MuleUMO is not registered or the component failed to resumepublic void setComponents(java.util.List descriptors) throws UMOException
UMOModel
setComponents
in interface UMOModel
descriptors
-
UMOException
public void initialise() throws InitialisationException, RecoverableException
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 java.beans.ExceptionListener getExceptionListener()
UMOModel
getExceptionListener
in interface UMOModel
ExceptionListener
public void setExceptionListener(java.beans.ExceptionListener exceptionListener)
UMOModel
setExceptionListener
in interface UMOModel
exceptionListener
- the default exception strategy for this model.ExceptionListener
public UMODescriptor getDescriptor(java.lang.String name)
UMOModel
getDescriptor
in interface UMOModel
name
- the name of the component
UMODescriptor
public java.util.Iterator getComponentNames()
getComponentNames
in interface UMOModel
public void setListeners(ServerEventManager listeners)
public void setComponentFactory(UMOComponentFactory factory)
UMOModel
setComponentFactory
in interface UMOModel
factory
- the factory used to create component wrappers that are
registered on the Modelpublic UMOComponentFactory getComponentFactory()
UMOModel
getComponentFactory
in interface UMOModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |