|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.MuleManager
MuleManager
maintains and provides services for a Mule instance.
Method Summary | |
protected static UMOManager |
createInstance()
ObjectFactory method to create the singleton MuleManager instance |
void |
dispose()
Destroys the MuleManager and all resources it maintains |
protected void |
disposeAgents()
{@inheritDoc} |
void |
fireEvent(UMOServerEvent event)
Fires a server event to all registered CustomEventListener
eventManager. |
protected void |
fireSystemEvent(UMOServerEvent e)
Fires a mule 'system' event. |
static MuleConfiguration |
getConfiguration()
|
java.util.Map |
getConnectors()
Gets an unmodifiable collection of Connectors registered with the UMOManager |
UMOContainerContext |
getContainerContext()
associates a Dependency Injector container with Mule. |
java.util.Map |
getEndpointIdentifiers()
Gets an unmodifiable collection of endpoints registered with the UMOManager |
java.util.Map |
getEndpoints()
Gets an unmodifiable collection of endpoints registered with the UMOManager |
java.lang.String |
getId()
Gets the unique Id for this Manager instance. |
static UMOManager |
getInstance()
Getter method for the current singleton MuleManager |
UMOModel |
getModel()
The model used for managing components for this server |
java.util.Map |
getProperties()
Gets all properties associated with the UMOManager |
java.lang.Object |
getProperty(java.lang.Object key)
Getter for the envionment parameters declared in the nule-config.xml |
UMOSecurityManager |
getSecurityManager()
Gets the security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations |
long |
getStartDate()
Returns the long date when the server was started |
protected java.lang.String |
getStartSplash()
Returns a formatted string that is a summary of the configuration of the server. |
AllStatistics |
getStatistics()
Gets all statisitcs for this instance |
TransactionManager |
getTransactionManager()
Returns the Jta transaction manager used by this Mule server instance. or null if a transaction manager has not been set |
java.util.Map |
getTransformers()
Gets an unmodifiable collection of transformers registered with the UMOManager |
protected void |
initialiseAgents()
Initialises all registered agents |
protected void |
initialiseEndpoints()
|
boolean |
isInitialised()
Determines if the server has been initialised |
boolean |
isInitialising()
Determines if the server is currently initialising |
static boolean |
isInstanciated()
A static method to determine if there is an instance of the MuleManager. |
boolean |
isStarted()
Determines if the server has been started |
UMOConnector |
lookupConnector(java.lang.String name)
|
UMOEndpoint |
lookupEndpoint(java.lang.String logicalName)
Getter for a global endpoint. Any endpoints returned from this method will be read-only as they may be shared by other components. To change any details on the endpoint you must clone it first calling it's clone() method |
java.lang.String |
lookupEndpointIdentifier(java.lang.String logicalName,
java.lang.String defaultName)
|
java.util.List |
lookupInterceptorStack(java.lang.String name)
Retrieves a configured interceptor stack. |
UMOTransformer |
lookupTransformer(java.lang.String name)
Getter method for a Transformer. |
void |
registerAgent(UMOAgent agent)
Will register an agent object on this model. Agents can be server plugins such as Jms support |
void |
registerConnector(UMOConnector connector)
Registers a UMOConnector with the MuleManager . |
void |
registerEndpoint(UMOEndpoint endpoint)
Registers a shared/global endpoint with the MuleManager . |
void |
registerEndpointIdentifier(java.lang.String logicalName,
java.lang.String endpoint)
Registers an endpointUri with a logical name |
void |
registerInterceptorStack(java.lang.String name,
java.util.List stack)
registers a interceptor stack list that can be referenced by other components |
void |
registerListener(UMOServerEventListener l)
Registers an intenal server event listener. The listener will be notified when a particular event happens within the server. Typically this is not an event in the same sense as an UMOEvent (although there is nothing stopping the implementation of this class triggering listeners when a UMOEvent is received). The types of events fired is entirely defined by the implementation of this class |
void |
registerTransformer(UMOTransformer transformer)
Registers a transformer with the MuleManager . |
UMOAgent |
removeAgent(java.lang.String name)
Removes and destroys a registered agent |
static void |
setConfiguration(MuleConfiguration config)
Sets the configuration for the MuleManager . |
void |
setContainerContext(UMOContainerContext container)
associates a Dependency Injector container with Mule. |
void |
setId(java.lang.String id)
Sets the unique Id for this Manager instance. |
static void |
setInstance(UMOManager manager)
Sets the current singleton MuleManager |
void |
setModel(UMOModel model)
The model used for managing components for this server |
void |
setProperty(java.lang.Object key,
java.lang.Object value)
Sets an Mule environment parameter in the MuleManager . |
void |
setSecurityManager(UMOSecurityManager securityManager)
Sets the security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations |
void |
setStatistics(AllStatistics stat)
Sets statistics on this instance |
void |
setTransactionManager(TransactionManager newManager)
Sets the Jta Transaction Manager to use with this Mule server instance |
void |
shutdown(java.lang.Throwable e,
boolean aggressive)
Shuts down the whole server tring to shut down all resources cleanly on the way |
void |
start()
Start the MuleManager . |
void |
start(java.lang.String serverUrl)
Start the MuleManager . |
protected void |
startAgents()
{@inheritDoc} |
void |
stop()
Stops the MuleManager which stops all sessions and connectors |
protected void |
stopAgents()
{@inheritDoc} |
void |
unregisterConnector(java.lang.String connectorName)
UnRegisters a UMOConnector with the MuleManager . |
void |
unregisterEndpoint(java.lang.String endpointName)
unregisters a shared/global endpoint with the MuleManager . |
void |
unregisterEndpointIdentifier(java.lang.String logicalName)
unregisters an endpointUri with a logical name |
void |
unregisterListener(UMOServerEventListener l)
Unregisters a previously registered listener. If the listener has not already been registered, this method should return without exception |
void |
unregisterTransformer(java.lang.String transformerName)
UnRegisters a transformer with the MuleManager . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
protected static UMOManager createInstance() throws MuleRuntimeException
MuleRuntimeException
public static UMOManager getInstance()
public static boolean isInstanciated()
if(MuleManager.getInstance()!=null)
because getInstance never returns a null. If an istance is not available
one is created. This method queries the instance directly.
public static void setInstance(UMOManager manager)
public AllStatistics getStatistics()
public void setStatistics(AllStatistics stat)
stat
- public static MuleConfiguration getConfiguration()
public static void setConfiguration(MuleConfiguration config)
MuleManager
.
config
- the configuration object
java.lang.IllegalAccessError
- if the MuleManager
has already been
initialised.public void dispose()
dispose
in interface Disposable
public java.lang.Object getProperty(java.lang.Object key)
getProperty
in interface UMOManager
key
- the propery name
public java.util.Map getProperties()
getProperties
in interface UMOManager
public TransactionManager getTransactionManager()
getTransactionManager
in interface UMOManager
public UMOConnector lookupConnector(java.lang.String name)
lookupConnector
in interface UMOManager
name
- the name of the endpoint to retrieve
public java.lang.String lookupEndpointIdentifier(java.lang.String logicalName, java.lang.String defaultName)
lookupEndpointIdentifier
in interface UMOManager
logicalName
- the logical mapping name for an endpointUri i.e.
rather than specifing an endpointUri to be someone@my.com you can supply
a more descriptive name such as The System AdministratordefaultName
-
public UMOEndpoint lookupEndpoint(java.lang.String logicalName)
lookupEndpoint
in interface UMOManager
logicalName
- the name of the endpoint
UMOEndpoint
or null if it doesn't existpublic UMOTransformer lookupTransformer(java.lang.String name)
lookupTransformer
in interface UMOManager
name
- the name of the transformer
public void registerConnector(UMOConnector connector) throws UMOException
UMOConnector
with the MuleManager
.
registerConnector
in interface UMOManager
connector
- the UMOConnector
to register
UMOException
public void unregisterConnector(java.lang.String connectorName) throws UMOException
UMOConnector
with the MuleManager
.
unregisterConnector
in interface UMOManager
connectorName
- the name of the UMOConnector
to unregister
UMOException
public void registerEndpointIdentifier(java.lang.String logicalName, java.lang.String endpoint)
registerEndpointIdentifier
in interface UMOManager
logicalName
- the name of the endpointUriendpoint
- the physical endpointUri valuepublic void unregisterEndpointIdentifier(java.lang.String logicalName)
unregisterEndpointIdentifier
in interface UMOManager
logicalName
- the name of the endpointUripublic void registerEndpoint(UMOEndpoint endpoint)
MuleManager
.
registerEndpoint
in interface UMOManager
endpoint
- the UMOEndpoint
to register.public void unregisterEndpoint(java.lang.String endpointName)
MuleManager
.
unregisterEndpoint
in interface UMOManager
endpointName
- the UMOEndpoint
name to unregister.public void registerTransformer(UMOTransformer transformer) throws InitialisationException
MuleManager
.
registerTransformer
in interface UMOManager
transformer
- the UMOTransformer
to register.
InitialisationException
public void unregisterTransformer(java.lang.String transformerName)
MuleManager
.
unregisterTransformer
in interface UMOManager
transformerName
- the UMOTransformer
name to register.public void setProperty(java.lang.Object key, java.lang.Object value)
MuleManager
.
setProperty
in interface UMOManager
key
- the parameter namevalue
- the parameter valuepublic void setTransactionManager(TransactionManager newManager) throws UMOException
setTransactionManager
in interface UMOManager
newManager
- the manager to use
UMOException
protected void initialiseEndpoints() throws InitialisationException
InitialisationException
public void start() throws UMOException
MuleManager
. This will start the connectors
and sessions.
start
in interface Startable
UMOException
- if the the connectors or components fail to startpublic void start(java.lang.String serverUrl) throws UMOException
MuleManager
. This will start the connectors
and sessions.
serverUrl
- the server Url for this instance
UMOException
- if the the connectors or components fail to startpublic void stop() throws UMOException
MuleManager
which stops all sessions and connectors
stop
in interface Stoppable
UMOException
- if either any of the sessions or connectors fail to stoppublic void shutdown(java.lang.Throwable e, boolean aggressive)
e
- an exception that caused the shutdown()
method
to be called. If e is null the shutdown message will just display a time when
the server was shutdown. Otherwise the exception information will also be displayed.public UMOModel getModel()
getModel
in interface UMOManager
public void setModel(UMOModel model)
setModel
in interface UMOManager
model
- The model used for managing components for this serverpublic void registerInterceptorStack(java.lang.String name, java.util.List stack)
registerInterceptorStack
in interface UMOManager
name
- the referenceable name for this stackstack
- a List of interceptorsUMOInterceptor
public java.util.List lookupInterceptorStack(java.lang.String name)
lookupInterceptorStack
in interface UMOManager
name
- the name of the stack
public java.util.Map getConnectors()
getConnectors
in interface UMOManager
UMOConnector
public java.util.Map getEndpointIdentifiers()
getEndpointIdentifiers
in interface UMOManager
public java.util.Map getEndpoints()
getEndpoints
in interface UMOManager
UMOEndpoint
public java.util.Map getTransformers()
getTransformers
in interface UMOManager
UMOTransformer
public boolean isStarted()
isStarted
in interface UMOManager
public boolean isInitialised()
isInitialised
in interface UMOManager
public boolean isInitialising()
public long getStartDate()
getStartDate
in interface UMOManager
protected java.lang.String getStartSplash()
public void registerAgent(UMOAgent agent) throws UMOException
registerAgent
in interface UMOManager
agent
-
UMOException
public UMOAgent removeAgent(java.lang.String name) throws UMOException
removeAgent
in interface UMOManager
name
- the agent name
UMOException
protected void initialiseAgents() throws InitialisationException
InitialisationException
protected void startAgents() throws UMOException
UMOException
protected void stopAgents() throws UMOException
UMOException
protected void disposeAgents()
public void setContainerContext(UMOContainerContext container) throws UMOException
setContainerContext
in interface UMOManager
container
- a Container context to use. By default, there is a default
Mule container MuleContainerContext
that will assume that the
reference key for an oblect is a classname and will try to instanciate it.
UMOException
public UMOContainerContext getContainerContext()
getContainerContext
in interface UMOManager
public void registerListener(UMOServerEventListener l)
registerListener
in interface UMOManager
l
- the listener to registerpublic void unregisterListener(UMOServerEventListener l)
unregisterListener
in interface UMOManager
l
- the listener to unregisterprotected void fireSystemEvent(UMOServerEvent e)
e
- the event that occurredpublic void fireEvent(UMOServerEvent event)
CustomEventListener
eventManager.
fireEvent
in interface UMOManager
event
- the event to fire. This must be of type CustomEvent
otherwise an exception will be thrown.
java.lang.UnsupportedOperationException
- if the event fired is not a CustomEvent
public void setId(java.lang.String id)
UMOManager
setId
in interface UMOManager
id
- the unique Id for this manager in the networkpublic java.lang.String getId()
UMOManager
getId
in interface UMOManager
public void setSecurityManager(UMOSecurityManager securityManager) throws InitialisationException
setSecurityManager
in interface UMOManager
securityManager
- the security manager used by this Mule instance to authenticate and authorise
incoming and outgoing event traffic and service invocations
InitialisationException
public UMOSecurityManager getSecurityManager()
getSecurityManager
in interface UMOManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |