|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.MuleManager
public class MuleManager
MuleManager
maintains and provides services for a Mule instance.
Method Summary | |
---|---|
void |
addProperties(Map props)
|
void |
dispose()
Destroys the MuleManager and all resources it maintains |
protected void |
disposeAgents()
|
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()
Deprecated. endpoint-identifiers have been deprecated in favor of global-endpoints |
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 |
Map |
getModels()
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 |
AllStatistics |
getStatistics()
Gets all statisitcs for this instance |
TransactionManager |
getTransactionManager()
Returns the Jta transaction manager used by this Mule server instance. |
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()
|
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. |
UMOEndpoint |
lookupEndpointByAddress(String address)
|
String |
lookupEndpointIdentifier(String logicalName,
String defaultName)
Deprecated. endpoint-identifiers have been deprecated in favor of global-endpoints |
UMOInterceptorStack |
lookupInterceptorStack(String name)
Retrieves a configured interceptor stack. |
UMOModel |
lookupModel(String name)
The model used for managing components for this server |
UMOTransformer |
lookupTransformer(String name)
Getter method for a Transformer. |
protected void |
registerAdminAgent()
|
void |
registerAgent(UMOAgent agent)
Will register an agent object on this model. |
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)
Deprecated. endpoint-identifiers have been deprecated in favor of global-endpoints |
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. |
void |
registerListener(UMOServerNotificationListener l,
String resourceIdentifier)
Registers an intenal server event listener. |
void |
registerModel(UMOModel model)
|
protected static void |
registerSystemModel(String type)
|
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 |
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 |
start()
Start the MuleManager . |
void |
start(String serverUrl)
Start the MuleManager . |
protected void |
startAgents()
|
void |
stop()
Stops the MuleManager which stops all sessions and connectors |
protected void |
stopAgents()
|
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)
Deprecated. endpoint-identifiers have been deprecated in favor of global-endpoints |
void |
unregisterListener(UMOServerNotificationListener l)
Unregisters a previously registered listener. |
void |
unregisterModel(String name)
|
void |
unregisterTransformer(String transformerName)
UnRegisters a transformer with the MuleManager . |
protected void |
validateEncoding()
|
protected void |
validateOSEncoding()
|
protected void |
validateXML()
Mule needs a proper JAXP implementation and will complain when run with a plain JDK 1.4. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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) throws UMOException
MuleManager
.
config
- the configuration object
IllegalAccessError
- if the MuleManager
has already been
initialised.
UMOException
protected static void registerSystemModel(String type) throws UMOException
UMOException
public void dispose()
dispose
in interface Disposable
public Object getProperty(Object key)
getProperty
in interface UMOManager
key
- the propery name
public Map getProperties()
getProperties
in interface UMOManager
public TransactionManager getTransactionManager()
getTransactionManager
in interface UMOManager
public UMOConnector lookupConnector(String name)
lookupConnector
in interface UMOManager
name
- the name of the endpoint to retrieve
public String lookupEndpointIdentifier(String logicalName, 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 Administrator
public UMOEndpoint lookupEndpoint(String logicalName)
lookupEndpoint
in interface UMOManager
logicalName
- 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 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(String connectorName) throws UMOException
UMOConnector
with the MuleManager
.
unregisterConnector
in interface UMOManager
connectorName
- the name of the UMOConnector
to unregister
UMOException
public void registerEndpointIdentifier(String logicalName, String endpoint)
registerEndpointIdentifier
in interface UMOManager
logicalName
- the name of the endpointUriendpoint
- the physical endpointUri valuepublic void unregisterEndpointIdentifier(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(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(String transformerName)
MuleManager
.
unregisterTransformer
in interface UMOManager
transformerName
- the UMOTransformer
name to register.public void setProperty(Object key, Object value)
MuleManager
.
setProperty
in interface UMOManager
key
- the parameter namevalue
- the parameter valuepublic void addProperties(Map props)
public void setTransactionManager(TransactionManager newManager) throws UMOException
setTransactionManager
in interface UMOManager
newManager
- 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 validateXML() throws FatalException
-Djava.endorsed.dirs
. See the following URLs for more information:
http://xerces.apache.org/xerces2-j/faq-general.html#faq-4
http://xml.apache.org/xalan-j/faq.html#faq-N100D6
http://java.sun.com/j2se/1.4.2/docs/guide/standards/
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 Startable
UMOException
- if the the connectors or components fail to startpublic 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 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 UMOModel lookupModel(String name)
UMOManager
lookupModel
in interface UMOManager
public void registerModel(UMOModel model) throws UMOException
registerModel
in interface UMOManager
UMOException
public void unregisterModel(String name)
unregisterModel
in interface UMOManager
public Map getModels()
UMOManager
getModels
in interface UMOManager
public void registerInterceptorStack(String name, UMOInterceptorStack stack)
registerInterceptorStack
in interface UMOManager
name
- the referenceable name for this stackstack
- a List of interceptorsUMOInterceptor
public UMOInterceptorStack lookupInterceptorStack(String name)
lookupInterceptorStack
in interface UMOManager
name
- the name of the stack
public Map getConnectors()
getConnectors
in interface UMOManager
UMOConnector
public Map getEndpointIdentifiers()
getEndpointIdentifiers
in interface UMOManager
public Map getEndpoints()
getEndpoints
in interface UMOManager
UMOEndpoint
public 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 boolean isStopping()
public long getStartDate()
getStartDate
in interface UMOManager
public void registerAgent(UMOAgent agent) throws UMOException
registerAgent
in interface UMOManager
UMOException
public UMOAgent lookupAgent(String name)
UMOManager
lookupAgent
in interface UMOManager
name
- the name of the Agent to find
public UMOAgent unregisterAgent(String name) throws UMOException
unregisterAgent
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(UMOServerNotificationListener l) throws NotificationException
registerListener
in interface UMOManager
l
- the listener to register
NotificationException
public void registerListener(UMOServerNotificationListener l, String resourceIdentifier) throws NotificationException
UMOManager
registerListener
in interface UMOManager
l
- 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
NotificationException
public void unregisterListener(UMOServerNotificationListener l)
unregisterListener
in interface UMOManager
l
- the listener to unregisterprotected void fireSystemEvent(UMOServerNotification e)
e
- the event that occurredpublic void fireNotification(UMOServerNotification notification)
CustomNotificationListener
notificationManager. TODO RM: This method now duplicates #fireSystemEvent()
completely
fireNotification
in interface UMOManager
notification
- the notification to fire. This must be of type
CustomNotification
otherwise an exception will be thrown.
UnsupportedOperationException
- if the notification fired is not a
CustomNotification
public void setId(String id)
UMOManager
setId
in interface UMOManager
id
- 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 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
public UMOWorkManager getWorkManager()
initialise()
method has been
called a default MuleWorkManager
will be created using the
DefaultThreadingProfile on the MuleConfiguration
object.
getWorkManager
in interface UMOManager
ThreadingProfile
,
MuleConfiguration
public 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 UMOManager
workManager
- the workManager instance used by the current MuleManager
IllegalStateException
- if the workManager has already been set.ThreadingProfile
,
MuleConfiguration
,
MuleWorkManager
public QueueManager getQueueManager()
UMOManager
getQueueManager
in interface UMOManager
public void setQueueManager(QueueManager queueManager)
UMOManager
setQueueManager
in interface UMOManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |