org.mule.impl.internal.notifications
Class ServerNotificationManager

java.lang.Object
  extended by org.mule.impl.internal.notifications.ServerNotificationManager
All Implemented Interfaces:
Runnable, javax.resource.spi.work.Work, Disposable

public class ServerNotificationManager
extends Object
implements javax.resource.spi.work.Work, Disposable

ServerNotificationManager manages all server listeners for a Mule instance.


Nested Class Summary
protected  class ServerNotificationManager.Listener
           
 
Field Summary
protected static Log logger
          logger used by this class
static String NULL_SUBSCRIPTION
           
 
Constructor Summary
ServerNotificationManager()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 void fireEvent(UMOServerNotification notification)
           
 javax.resource.spi.work.WorkListener getWorkListener()
           
protected  void notifyListeners(UMOServerNotification notification)
          Exceptions should not be thrown from this method
 void registerEventType(Class eventType, Class listenerType)
           
 void registerListener(UMOServerNotificationListener listener)
           
 void registerListener(UMOServerNotificationListener listener, String subscription)
           
 void release()
           
 void run()
          When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
 void setWorkListener(javax.resource.spi.work.WorkListener workListener)
           
 void start(UMOWorkManager workManager)
           
 void unregisterListener(UMOServerNotificationListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
logger used by this class


NULL_SUBSCRIPTION

public static final String NULL_SUBSCRIPTION
See Also:
Constant Field Values
Constructor Detail

ServerNotificationManager

public ServerNotificationManager()
Method Detail

start

public void start(UMOWorkManager workManager)
           throws LifecycleException
Throws:
LifecycleException

registerEventType

public void registerEventType(Class eventType,
                              Class listenerType)

registerListener

public void registerListener(UMOServerNotificationListener listener)
                      throws NotificationException
Throws:
NotificationException

registerListener

public void registerListener(UMOServerNotificationListener listener,
                             String subscription)
                      throws NotificationException
Throws:
NotificationException

unregisterListener

public void unregisterListener(UMOServerNotificationListener listener)

fireEvent

public void fireEvent(UMOServerNotification notification)

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

notifyListeners

protected void notifyListeners(UMOServerNotification notification)
Exceptions should not be thrown from this method

Parameters:
notification -

release

public void release()
Specified by:
release in interface javax.resource.spi.work.Work

run

public void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

The general contract of the method run is that it may take any action whatsoever.

Specified by:
run in interface Runnable
See Also:
Thread.run()

getWorkListener

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

setWorkListener

public void setWorkListener(javax.resource.spi.work.WorkListener workListener)


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.