|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.event.PollEventDispatcher
public class PollEventDispatcher
Dispatcher for PollEvents. Register PollListeners at runtime using
the addListener(PollListener) method, or add a child Jive Property to the key
"eventListeners.PollListener" to register a listener that will persist across restarts.
For example, to register the com.acme.CustomPollListener 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.PollListener.customPollListener",
"com.acme.CustomPollListener.class");
// now add it for this runtime instance
PollEventDispatcher.addListener(new com.acme.CustomerPollListener());
| Method Summary | |
|---|---|
void |
addListener(PollListener listener)
Adds an event listener to the dispatcher. |
static void |
destroy()
Destroy dispatcher. |
void |
dispatchEvent(PollEvent event)
Dispatches an event to all listeners. |
static PollEventDispatcher |
getInstance()
Returns an event dispatcher instance. |
void |
removeListener(PollListener listener)
Removes an event listener from the dispatcher. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PollEventDispatcher getInstance()
public void addListener(PollListener listener)
listener - the listener.public void removeListener(PollListener listener)
listener - the listener.public static void destroy()
public void dispatchEvent(PollEvent event)
event - the event.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||