|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.DefaultMuleContext
public class DefaultMuleContext
| Field Summary | |
|---|---|
protected MuleContextLifecycleManager |
lifecycleManager
LifecycleManager for the MuleContext. |
protected ServerNotificationManager |
notificationManager
|
| 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 |
| Constructor Summary | |
|---|---|
DefaultMuleContext(MuleConfiguration config,
WorkManager workManager,
javax.resource.spi.work.WorkListener workListener,
MuleContextLifecycleManager lifecycleManager,
ServerNotificationManager notificationManager)
|
|
| Method Summary | |
|---|---|
void |
addRegistry(Registry registry)
|
protected void |
checkLifecycleForPropertySet(String propertyName,
String phase)
|
protected DefaultRegistryBroker |
createRegistryBroker()
|
protected MuleRegistry |
createRegistryHelper(DefaultRegistryBroker registry)
|
void |
deregister()
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
void |
fireNotification(ServerNotification notification)
Fires a server notification to all registered CustomNotificationListener notificationManager. |
MuleConfiguration |
getConfiguration()
|
static MuleContext |
getContext()
|
ThreadingProfile |
getDefaultMessageDispatcherThreadingProfile()
|
ThreadingProfile |
getDefaultMessageReceiverThreadingProfile()
|
ThreadingProfile |
getDefaultMessageRequesterThreadingProfile()
|
ThreadingProfile |
getDefaultServiceThreadingProfile()
|
ThreadingProfile |
getDefaultThreadingProfile()
|
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()
|
String |
getRegistryId()
|
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 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. |
javax.resource.spi.work.WorkListener |
getWorkListener()
|
WorkManager |
getWorkManager()
Obtains a workManager instance that can be used to schedule work in a thread pool. |
void |
initialise()
Method used to perform any initialisation work. |
protected void |
initSplashScreens()
|
boolean |
isDisposed()
|
boolean |
isDisposing()
|
boolean |
isInitialised()
Determines if the server has been initialised |
boolean |
isInitialising()
Determines if the server is being initialised |
boolean |
isStarted()
Determines if the server has been started |
protected boolean |
isStarting()
|
protected boolean |
isStopped()
|
protected boolean |
isStopping()
|
void |
register()
|
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 |
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 |
setSplash(SplashScreen startup,
SplashScreen shutdown)
|
void |
setTransactionManager(TransactionManager manager)
Sets the Jta Transaction Manager to use with this Mule server instance |
void |
start()
|
void |
stop()
Stops the MuleContext which stops all sessions and
connectors |
void |
unregisterListener(ServerNotificationListener l)
Unregisters a previously registered listener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MuleContextLifecycleManager lifecycleManager
protected ServerNotificationManager notificationManager
| Constructor Detail |
|---|
public DefaultMuleContext(MuleConfiguration config,
WorkManager workManager,
javax.resource.spi.work.WorkListener workListener,
MuleContextLifecycleManager lifecycleManager,
ServerNotificationManager notificationManager)
| Method Detail |
|---|
public static MuleContext getContext()
protected DefaultRegistryBroker createRegistryBroker()
protected MuleRegistry createRegistryHelper(DefaultRegistryBroker registry)
public void setSplash(SplashScreen startup,
SplashScreen shutdown)
protected void initSplashScreens()
public void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from
public void start()
throws MuleException
start in interface StartableMuleException
public void stop()
throws MuleException
MuleContext which stops all sessions and
connectors
stop in interface StoppableMuleException - if either any of the sessions or connectors fail to stoppublic void dispose()
Disposable
dispose in interface Disposablepublic boolean isInitialised()
isInitialised in interface MuleContextpublic boolean isInitialising()
isInitialising in interface MuleContextprotected boolean isStopped()
protected boolean isStopping()
public boolean isStarted()
isStarted in interface MuleContextprotected boolean isStarting()
public boolean isDisposed()
isDisposed in interface MuleContextpublic boolean isDisposing()
isDisposing in interface MuleContextpublic LifecycleManager getLifecycleManager()
getLifecycleManager in interface MuleContextpublic AllStatistics getStatistics()
getStatistics in interface MuleContext
public void registerListener(ServerNotificationListener l)
throws NotificationException
MuleContext
registerListener in interface MuleContextl - the listener to register
NotificationException
public void registerListener(ServerNotificationListener l,
String resourceIdentifier)
throws NotificationException
MuleContext
registerListener in interface MuleContextl - the listener to registerresourceIdentifier - 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
NotificationExceptionpublic void unregisterListener(ServerNotificationListener l)
MuleContext
unregisterListener in interface MuleContextl - the listener to unregisterpublic void fireNotification(ServerNotification notification)
CustomNotificationListener notificationManager.
fireNotification in interface MuleContextnotification - 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 setSecurityManager(SecurityManager securityManager)
throws RegistrationException
setSecurityManager in interface MuleContextsecurityManager - the security manager used by this Mule instance to
authenticate and authorise incoming and outgoing event traffic
and service invocations
RegistrationExceptionpublic SecurityManager getSecurityManager()
getSecurityManager in interface MuleContextpublic WorkManager getWorkManager()
initialise() method has been called a default
MuleWorkManager will be created using the
DefaultThreadingProfile on the MuleConfiguration
object.
getWorkManager in interface MuleContextThreadingProfile,
DefaultMuleConfigurationpublic javax.resource.spi.work.WorkListener getWorkListener()
getWorkListener in interface MuleContextpublic QueueManager getQueueManager()
MuleContext
getQueueManager in interface MuleContext
public void setQueueManager(QueueManager queueManager)
throws RegistrationException
MuleContext
setQueueManager in interface MuleContextRegistrationExceptionpublic MuleConfiguration getConfiguration()
getConfiguration in interface MuleContextpublic ServerNotificationManager getNotificationManager()
getNotificationManager in interface MuleContext
public void setTransactionManager(TransactionManager manager)
throws RegistrationException
setTransactionManager in interface MuleContextmanager - the manager to use
Exception
RegistrationExceptionpublic TransactionManager getTransactionManager()
getTransactionManager in interface MuleContext
public void register()
throws RegistrationException
RegistrationException
public void deregister()
throws RegistrationException
RegistrationExceptionpublic String getRegistryId()
protected void checkLifecycleForPropertySet(String propertyName,
String phase)
throws IllegalStateException
IllegalStateExceptionpublic MuleRegistry getRegistry()
getRegistry in interface MuleContextpublic ThreadingProfile getDefaultMessageDispatcherThreadingProfile()
getDefaultMessageDispatcherThreadingProfile in interface MuleContextpublic ThreadingProfile getDefaultMessageRequesterThreadingProfile()
getDefaultMessageRequesterThreadingProfile in interface MuleContextpublic ThreadingProfile getDefaultMessageReceiverThreadingProfile()
getDefaultMessageReceiverThreadingProfile in interface MuleContextpublic ThreadingProfile getDefaultServiceThreadingProfile()
getDefaultServiceThreadingProfile in interface MuleContextpublic ThreadingProfile getDefaultThreadingProfile()
getDefaultThreadingProfile in interface MuleContextpublic long getStartDate()
getStartDate in interface MuleContextpublic ExpressionManager getExpressionManager()
getExpressionManager in interface MuleContextExpressionManagerpublic void addRegistry(Registry registry)
addRegistry in interface MuleContextpublic void removeRegistry(Registry registry)
removeRegistry in interface MuleContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||