com.jivesoftware.community.event
Class MessageEventDispatcher
java.lang.Object
com.jivesoftware.community.event.MessageEventDispatcher
public class MessageEventDispatcher
- extends java.lang.Object
Dispatcher for MessageEvents. Register MessageListeners at runtime using
the addListener(MessageListener) method, or add a child Jive Property to the key
"eventListeners.MessageListener" to register a listener that will persist across restarts.
For example, to register the com.acme.CustomMessageListener class as a persistent listener
the following code could be used:
// add persistent key to have the listener loaded and registered automatically at startup
JiveGlobals.setJiveProperty("eventListeners.MessageListener.customMessageListener",
"com.acme.CustomMessageListener.class");
// now add it for this runtime instance
MessageEventDispatcher.addListener(new com.acme.CustomerMessageListener());
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static MessageEventDispatcher getInstance()
addListener
public void addListener(MessageListener listener)
removeListener
public void removeListener(MessageListener listener)
destroy
public static void destroy()
- Destroy dispatcher. Intended to be used primarily during testing.
dispatchEvent
public void dispatchEvent(MessageEvent event)
Copyright © 1999-2007 Jive Software.