|
|||||||||||
| 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.
| Field Summary | |
static String |
DEFAULT_MODEL_NAME
|
| Method Summary | |
void |
addProperties(Map props)
|
void |
dispose()
Destroys the MuleManager and all resources it maintains |
protected void |
disposeAgents()
{@inheritDoc} |
void |
fireNotification(UMOServerNotification notification)
Fires a server notification to all registered CustomNotificationListener
notificationManager. |
protected void |
fireSystemEvent(UMOServerNotification e)
Fires a mule 'system' event. |
static MuleConfiguration |
getConfiguration()
|
Map |
getConnectors()
Gets an unmodifiable collection of Connectors registered with the UMOManager |
UMOContainerContext |
getContainerContext()
associates a Dependency Injector container with Mule. |
Map |
getEndpointIdentifiers()
Gets an unmodifiable collection of endpoints registered with the UMOManager |
Map |
getEndpoints()
Gets an unmodifiable collection of endpoints registered with the UMOManager |
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 |
Map |
getProperties()
Gets all properties associated with the UMOManager |
Object |
getProperty(Object key)
Getter for the envionment parameters declared in the mule-config.xml |
QueueManager |
getQueueManager()
Gets the queue manager used by mule for queuing events. |
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 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 |
Map |
getTransformers()
Gets an unmodifiable collection of transformers registered with the UMOManager |
UMOWorkManager |
getWorkManager()
Obtains a workManager instance that can be used to schedule work in a thread pool. |
void |
initialise()
{@inheritDoc} |
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 |
boolean |
isStopping()
Determines in the manager is in the process of stopping. |
UMOAgent |
lookupAgent(String name)
Will find a registered agent using its name, which is unique for all registered agents |
UMOConnector |
lookupConnector(String name)
|
UMOEndpoint |
lookupEndpoint(String logicalName)
Getter for a global endpoint. Any endpoints returned from this method can be modified, as they are clones of the registered endpoints. |
UMOEndpoint |
lookupEndpointByAddress(String address)
{@inheritDoc} |
String |
lookupEndpointIdentifier(String logicalName,
String defaultName)
|
UMOInterceptorStack |
lookupInterceptorStack(String name)
Retrieves a configured interceptor stack. |
UMOTransformer |
lookupTransformer(String name)
Getter method for a Transformer. |
protected void |
registerAdminAgent()
|
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(String logicalName,
String endpoint)
Registers an endpointUri with a logical name |
void |
registerInterceptorStack(String name,
UMOInterceptorStack stack)
registers a interceptor stack list that can be referenced by other components |
void |
registerListener(UMOServerNotificationListener 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 notifications fired is entirely defined by the implementation of this class |
void |
registerListener(UMOServerNotificationListener l,
String resourceIdentifier)
Registers an intenal server event listener. |
void |
registerTransformer(UMOTransformer transformer)
Registers a transformer with the MuleManager. |
static void |
setConfiguration(MuleConfiguration config)
Deprecated. this will go away soon. |
void |
setContainerContext(UMOContainerContext container)
associates a Dependency Injector container or Jndi container with Mule. |
void |
setId(String id)
Sets the unique Id for this Manager instance. |
static void |
setInstance(UMOManager manager)
Deprecated. this will go away soon. |
void |
setModel(UMOModel model)
The model used for managing components for this server |
void |
setProperty(Object key,
Object value)
Sets an Mule environment parameter in the MuleManager. |
void |
setQueueManager(QueueManager queueManager)
Sets the queue manager used by mule for queuing events. |
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 |
setWorkManager(UMOWorkManager workManager)
Obtains a workManager instance that can be used to schedule work in a thread pool. |
void |
shutdown(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(String serverUrl)
Start the MuleManager. |
protected void |
startAgents()
{@inheritDoc} |
void |
stop()
Stops the MuleManager which stops all sessions and connectors |
protected void |
stopAgents()
{@inheritDoc} |
UMOAgent |
unregisterAgent(String name)
Removes and destroys a registered agent |
void |
unregisterConnector(String connectorName)
UnRegisters a UMOConnector with the MuleManager. |
void |
unregisterEndpoint(String endpointName)
unregisters a shared/global endpoint with the MuleManager. |
void |
unregisterEndpointIdentifier(String logicalName)
unregisters an endpointUri with a logical name |
void |
unregisterListener(UMOServerNotificationListener l)
Unregisters a previously registered listener. If the listener has not already been registered, this method should return without exception |
void |
unregisterTransformer(String transformerName)
UnRegisters a transformer with the MuleManager. |
protected void |
validateEncoding()
|
protected void |
validateOSEncoding()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String DEFAULT_MODEL_NAME
| Method Detail |
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
IllegalAccessError - if the MuleManager has already been
initialised.public void dispose()
dispose in interface Disposablepublic Object getProperty(Object key)
getProperty in interface UMOManagerkey - the propery name
public Map getProperties()
getProperties in interface UMOManagerpublic TransactionManager getTransactionManager()
getTransactionManager in interface UMOManagerpublic UMOConnector lookupConnector(String name)
lookupConnector in interface UMOManagername - the name of the endpoint to retrieve
public String lookupEndpointIdentifier(String logicalName,
String defaultName)
lookupEndpointIdentifier in interface UMOManagerlogicalName - 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(String logicalName)
lookupEndpoint in interface UMOManagerlogicalName - the name of the endpoint
UMOEndpoint or null if it doesn't existpublic UMOEndpoint lookupEndpointByAddress(String address)
public UMOTransformer lookupTransformer(String name)
lookupTransformer in interface UMOManagername - the name of the transformer
public void registerConnector(UMOConnector connector)
throws UMOException
UMOConnector with the MuleManager.
registerConnector in interface UMOManagerconnector - the UMOConnector to register
UMOException
public void unregisterConnector(String connectorName)
throws UMOException
UMOConnector with the MuleManager.
unregisterConnector in interface UMOManagerconnectorName - the name of the UMOConnector to unregister
UMOException
public void registerEndpointIdentifier(String logicalName,
String endpoint)
registerEndpointIdentifier in interface UMOManagerlogicalName - the name of the endpointUriendpoint - the physical endpointUri valuepublic void unregisterEndpointIdentifier(String logicalName)
unregisterEndpointIdentifier in interface UMOManagerlogicalName - the name of the endpointUripublic void registerEndpoint(UMOEndpoint endpoint)
MuleManager.
registerEndpoint in interface UMOManagerendpoint - the UMOEndpoint to register.public void unregisterEndpoint(String endpointName)
MuleManager.
unregisterEndpoint in interface UMOManagerendpointName - the UMOEndpoint name to unregister.
public void registerTransformer(UMOTransformer transformer)
throws InitialisationException
MuleManager.
registerTransformer in interface UMOManagertransformer - the UMOTransformer to register.
InitialisationExceptionpublic void unregisterTransformer(String transformerName)
MuleManager.
unregisterTransformer in interface UMOManagertransformerName - the UMOTransformer name to register.
public void setProperty(Object key,
Object value)
MuleManager.
setProperty in interface UMOManagerkey - the parameter namevalue - the parameter valuepublic void addProperties(Map props)
public void setTransactionManager(TransactionManager newManager)
throws UMOException
setTransactionManager in interface UMOManagernewManager - the manager to use
UMOException
public void initialise()
throws UMOException
UMOException
protected void validateEncoding()
throws FatalException
FatalException
protected void validateOSEncoding()
throws FatalException
FatalException
protected void registerAdminAgent()
throws UMOException
UMOException
protected void initialiseEndpoints()
throws InitialisationException
InitialisationException
public void start()
throws UMOException
MuleManager. This will start the connectors and
sessions.
start in interface StartableUMOException - if the the connectors or components fail to start
public void start(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 start
public void stop()
throws UMOException
MuleManager which stops all sessions and connectors
stop in interface StoppableUMOException - if either any of the sessions or connectors fail to stop
public void shutdown(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)
throws UMOException
setModel in interface UMOManagermodel - The model used for managing components for this server
UMOException
public void registerInterceptorStack(String name,
UMOInterceptorStack stack)
registerInterceptorStack in interface UMOManagername - the referenceable name for this stackstack - a List of interceptorsUMOInterceptorpublic UMOInterceptorStack lookupInterceptorStack(String name)
lookupInterceptorStack in interface UMOManagername - the name of the stack
public Map getConnectors()
getConnectors in interface UMOManagerUMOConnectorpublic Map getEndpointIdentifiers()
getEndpointIdentifiers in interface UMOManagerpublic Map getEndpoints()
getEndpoints in interface UMOManagerUMOEndpointpublic Map getTransformers()
getTransformers in interface UMOManagerUMOTransformerpublic boolean isStarted()
isStarted in interface UMOManagerpublic boolean isInitialised()
isInitialised in interface UMOManagerpublic boolean isInitialising()
public boolean isStopping()
public long getStartDate()
getStartDate in interface UMOManagerprotected String getStartSplash()
public void registerAgent(UMOAgent agent)
throws UMOException
registerAgent in interface UMOManageragent -
UMOExceptionpublic UMOAgent lookupAgent(String name)
UMOManager
lookupAgent in interface UMOManagername - the name of the Agent to find
public UMOAgent unregisterAgent(String name)
throws UMOException
unregisterAgent in interface UMOManagername - the agent name
UMOException
protected void initialiseAgents()
throws InitialisationException
InitialisationException
protected void startAgents()
throws UMOException
UMOException
protected void stopAgents()
throws UMOException
UMOExceptionprotected void disposeAgents()
public void setContainerContext(UMOContainerContext container)
throws UMOException
setContainerContext in interface UMOManagercontainer - 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.
UMOExceptionpublic UMOContainerContext getContainerContext()
getContainerContext in interface UMOManager
public void registerListener(UMOServerNotificationListener l)
throws NotificationException
registerListener in interface UMOManagerl - the listener to register
NotificationException
public void registerListener(UMOServerNotificationListener l,
String resourceIdentifier)
throws NotificationException
UMOManager
registerListener in interface UMOManagerl - the listener to registerresourceIdentifier - a particular resource name for the given type of
listener For example, the resourceName could be the name of a
component if the listener was a ComponentNotificationListener
NotificationExceptionpublic void unregisterListener(UMOServerNotificationListener l)
unregisterListener in interface UMOManagerl - the listener to unregisterprotected void fireSystemEvent(UMOServerNotification e)
e - the event that occurredpublic void fireNotification(UMOServerNotification notification)
CustomNotificationListener
notificationManager.
fireNotification in interface UMOManagernotification - the notification to fire. This must be of type
CustomNotification
otherwise an exception will be thrown.
UnsupportedOperationException - if the notification fired is not a
CustomNotificationpublic void setId(String id)
UMOManager
setId in interface UMOManagerid - the unique Id for this manager in the networkpublic String getId()
UMOManager
getId in interface UMOManager
public void setSecurityManager(UMOSecurityManager securityManager)
throws InitialisationException
setSecurityManager in interface UMOManagersecurityManager - the security manager used by this Mule instance to
authenticate and authorise incoming and outgoing event traffic and
service invocations
InitialisationExceptionpublic UMOSecurityManager getSecurityManager()
getSecurityManager in interface UMOManagerpublic UMOWorkManager getWorkManager()
initialise() method has been
called a default MuleWorkManager will be created using the
DefaultThreadingProfile on the MuleConfiguration
object.
getWorkManager in interface UMOManagerThreadingProfile,
MuleConfigurationpublic void setWorkManager(UMOWorkManager workManager)
initialise() method has been
called a default MuleWorkManager will be created using the
DefaultThreadingProfile on the MuleConfiguration
object.
setWorkManager in interface UMOManagerworkManager - the workManager instance used by the current MuleManager
IllegalStateException - if the workManager has already been set.ThreadingProfile,
MuleConfiguration,
MuleWorkManagerpublic QueueManager getQueueManager()
UMOManager
getQueueManager in interface UMOManagerpublic void setQueueManager(QueueManager queueManager)
UMOManager
setQueueManager in interface UMOManagerqueueManager -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||