|
|||||||||||
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 |
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. |
UMOExceptionStrategy |
getExceptionStrategy()
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()
|
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 |
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 |
setExceptionStrategy(UMOExceptionStrategy exceptionStrategy)
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() throws UMOException
dispose
in interface Disposable
UMOException
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
initialise
in interface Initialisable
InitialisationException
public UMOExceptionStrategy getExceptionStrategy()
UMOModel
getExceptionStrategy
in interface UMOModel
UMOExceptionStrategy
public void setExceptionStrategy(UMOExceptionStrategy exceptionStrategy)
UMOModel
setExceptionStrategy
in interface UMOModel
exceptionStrategy
- the default exception strategy for this model.UMOExceptionStrategy
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)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |