org.mule.api
Interface MuleContext

All Superinterfaces:
Disposable, Initialisable, Lifecycle, Startable, Stoppable
All Known Implementing Classes:
DefaultMuleContext

public interface MuleContext
extends Lifecycle


Field Summary
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Method Summary
 void addRegistry(Registry registry)
           
 void fireNotification(ServerNotification notification)
          Fires a server notification to all regiistered listeners
 LocalMuleClient getClient()
           
 String getClusterId()
           
 int getClusterNodeId()
           
 MuleConfiguration getConfiguration()
           
 Map<QName,Set<Object>> getConfigurationAnnotations()
          Return all annotations seen in the configuration
 DataTypeConversionResolver getDataTypeConverterResolver()
           
 MessagingExceptionHandler getDefaultExceptionStrategy()
           
 ThreadingProfile getDefaultMessageDispatcherThreadingProfile()
           
 ThreadingProfile getDefaultMessageReceiverThreadingProfile()
           
 ThreadingProfile getDefaultMessageRequesterThreadingProfile()
           
 ThreadingProfile getDefaultServiceThreadingProfile()
           
 ThreadingProfile getDefaultThreadingProfile()
           
 EndpointFactory getEndpointFactory()
          Returns the EndpointFactory configured for this instance of Mule
 SystemExceptionHandler getExceptionListener()
           
 ClassLoader getExecutionClassLoader()
           
 ExpressionLanguage getExpressionLanguage()
          Expression Language for evaluating expressions using Mule as the context
 ExpressionManager getExpressionManager()
          Returns the Expression Manager configured for this instance of Mule
 LifecycleManager getLifecycleManager()
           
 ServerNotificationManager getNotificationManager()
           
 QueueManager getQueueManager()
          Gets the queue manager used by mule for queuing events.
 MuleRegistry getRegistry()
           
 SecurityManager 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 date when the server was started.
 AllStatistics getStatistics()
           
 SingleResourceTransactionFactoryManager getTransactionFactoryManager()
           
 TransactionManager getTransactionManager()
          Returns the Jta transaction manager used by this Mule server instance.
 String getUniqueIdString()
          Generate a unique ID string; this will begin with the cluster node ID followed by a dash, e.g.
 javax.resource.spi.work.WorkListener getWorkListener()
           
 WorkManager getWorkManager()
          Obtains a workManager instance that can be used to schedule work in a thread pool.
 void handleException(Exception e)
           
 void handleException(Exception e, RollbackSourceCallback rollbackMethod)
           
 boolean isDisposed()
           
 boolean isDisposing()
           
 boolean isInitialised()
          Determines if the server has been initialised
 boolean isInitialising()
          Determines if the server is being initialised
 boolean isPrimaryPollingInstance()
           
 boolean isStarted()
          Determines if the server has been started
 boolean isStarting()
           
 boolean isStopped()
           
 boolean isStopping()
           
 void registerListener(ServerNotificationListener l)
          Registers an intenal server event listener.
 void registerListener(ServerNotificationListener l, String resourceIdentifier)
          Registers an intenal server event listener.
 void removeRegistry(Registry registry)
           
 void setExceptionListener(SystemExceptionHandler exceptionListener)
           
 void setExecutionClassLoader(ClassLoader cl)
           
 void setObjectStore(String name, ListableObjectStore<Serializable> store)
           
 void setQueueManager(QueueManager queueManager)
          Sets the queue manager used by mule for queuing events.
 void setSecurityManager(SecurityManager securityManager)
          Sets the security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations
 void setTransactionManager(TransactionManager manager)
          Sets the Jta Transaction Manager to use with this Mule server instance
 void unregisterListener(ServerNotificationListener l)
          Unregisters a previously registered listener.
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Method Detail

setTransactionManager

void setTransactionManager(TransactionManager manager)
                           throws Exception
Sets the Jta Transaction Manager to use with this Mule server instance

Parameters:
manager - the manager to use
Throws:
Exception

getTransactionManager

TransactionManager getTransactionManager()
Returns the Jta transaction manager used by this Mule server instance. or null if a transaction manager has not been set

Returns:
the Jta transaction manager used by this Mule server instance. or null if a transaction manager has not been set

getNotificationManager

ServerNotificationManager getNotificationManager()

isStarted

boolean isStarted()
Determines if the server has been started

Returns:
true if the server has been started

isInitialised

boolean isInitialised()
Determines if the server has been initialised

Returns:
true if the server has been initialised

isInitialising

boolean isInitialising()
Determines if the server is being initialised

Returns:
true if the server is beening initialised

isDisposed

boolean isDisposed()

isDisposing

boolean isDisposing()

registerListener

void registerListener(ServerNotificationListener l)
                      throws NotificationException
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 MuleEvent (although there is nothing stopping the implementation of this class triggering listeners when a MuleEvent is received).

The types of notifications fired is entirely defined by the implementation of this class

Parameters:
l - the listener to register
Throws:
NotificationException

registerListener

void registerListener(ServerNotificationListener l,
                      String resourceIdentifier)
                      throws NotificationException
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 MuleEvent (although there is nothing stopping the implementation of this class triggering listeners when a MuleEvent is received).

The types of notifications fired is entirely defined by the implementation of this class

Parameters:
l - the listener to register
resourceIdentifier - a particular resource name for the given type of listener For example, the resourceName could be the name of a service if the listener was a ServiceNotificationListener
Throws:
NotificationException

unregisterListener

void unregisterListener(ServerNotificationListener l)
Unregisters a previously registered listener. If the listener has not already been registered, this method should return without exception

Parameters:
l - the listener to unregister

fireNotification

void fireNotification(ServerNotification notification)
Fires a server notification to all regiistered listeners

Parameters:
notification - the notification to fire

setSecurityManager

void setSecurityManager(SecurityManager securityManager)
                        throws InitialisationException,
                               RegistrationException
Sets the security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations

Parameters:
securityManager - the security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations
Throws:
RegistrationException
InitialisationException

getSecurityManager

SecurityManager getSecurityManager()
Gets the security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations

Returns:
he security manager used by this Mule instance to authenticate and authorise incoming and outgoing event traffic and service invocations

getWorkManager

WorkManager getWorkManager()
Obtains a workManager instance that can be used to schedule work in a thread pool. This will be used primarially by Agents wanting to schedule work. This work Manager must never be used by provider implementations as they have their own workManager accible on the connector.

Returns:
a workManager instance used by the current MuleManager

getWorkListener

javax.resource.spi.work.WorkListener getWorkListener()

setQueueManager

void setQueueManager(QueueManager queueManager)
                     throws RegistrationException
Sets the queue manager used by mule for queuing events. This is used for service queues

Parameters:
queueManager -
Throws:
RegistrationException

getQueueManager

QueueManager getQueueManager()
Gets the queue manager used by mule for queuing events. This is used for service queues.


getStatistics

AllStatistics getStatistics()

getLifecycleManager

LifecycleManager getLifecycleManager()

getRegistry

MuleRegistry getRegistry()

getConfiguration

MuleConfiguration getConfiguration()

getDefaultMessageDispatcherThreadingProfile

ThreadingProfile getDefaultMessageDispatcherThreadingProfile()

getDefaultMessageRequesterThreadingProfile

ThreadingProfile getDefaultMessageRequesterThreadingProfile()

getDefaultMessageReceiverThreadingProfile

ThreadingProfile getDefaultMessageReceiverThreadingProfile()

getDefaultServiceThreadingProfile

ThreadingProfile getDefaultServiceThreadingProfile()

getDefaultThreadingProfile

ThreadingProfile getDefaultThreadingProfile()

addRegistry

void addRegistry(Registry registry)

removeRegistry

void removeRegistry(Registry registry)

getStartDate

long getStartDate()
Returns the date when the server was started.

Returns:
the date when the server was started.

getExpressionManager

ExpressionManager getExpressionManager()
Returns the Expression Manager configured for this instance of Mule

Returns:
the Expression Manager configured for this instance of Mule
See Also:
ExpressionManager

getEndpointFactory

EndpointFactory getEndpointFactory()
Returns the EndpointFactory configured for this instance of Mule

Returns:
the EndpointFactory configured for this instance of Mule
See Also:
EndpointFactory

setExecutionClassLoader

void setExecutionClassLoader(ClassLoader cl)

getExecutionClassLoader

ClassLoader getExecutionClassLoader()

isStopped

boolean isStopped()

isStopping

boolean isStopping()

isStarting

boolean isStarting()

getClient

LocalMuleClient getClient()

getExceptionListener

SystemExceptionHandler getExceptionListener()

setExceptionListener

void setExceptionListener(SystemExceptionHandler exceptionListener)

setObjectStore

void setObjectStore(String name,
                    ListableObjectStore<Serializable> store)
                    throws RegistrationException
Throws:
RegistrationException

handleException

void handleException(Exception e,
                     RollbackSourceCallback rollbackMethod)

handleException

void handleException(Exception e)

getClusterId

String getClusterId()
Returns:
the ID of the cluster the current instance belongs to. Returns the empty string if this instance isn't part of a cluster.

getClusterNodeId

int getClusterNodeId()
Returns:
the cluster node ID for the current instance belongs to. Returns 0 if this instance isn't part of a cluster.

isPrimaryPollingInstance

boolean isPrimaryPollingInstance()
Returns:
true if this instance in the designated poller. This will always be true unless the instance is part of a cluster.

getUniqueIdString

String getUniqueIdString()
Generate a unique ID string; this will begin with the cluster node ID followed by a dash, e.g. "3-XXXYYY"


getConfigurationAnnotations

Map<QName,Set<Object>> getConfigurationAnnotations()
Return all annotations seen in the configuration


getDefaultExceptionStrategy

MessagingExceptionHandler getDefaultExceptionStrategy()
Returns:
default exception strategy. If no default exception strategy was configured it returns DefaultMessagingExceptionStrategy

getTransactionFactoryManager

SingleResourceTransactionFactoryManager getTransactionFactoryManager()
Returns:
single resource transaction factory manager. Used to retrieve a transaction factory for each transactional resource (i.e jdbc DataSource, jms Connection)

getDataTypeConverterResolver

DataTypeConversionResolver getDataTypeConverterResolver()
Returns:
a non null DataTypeConversionResolver instance to resolve implicit data type conversions

getExpressionLanguage

ExpressionLanguage getExpressionLanguage()
Expression Language for evaluating expressions using Mule as the context

Returns:


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.