Clearspace API (1.3.0) Core Javadocs

com.jivesoftware.community.event
Class BlogPostEventDispatcher

java.lang.Object
  extended by com.jivesoftware.community.event.BlogPostEventDispatcher

public class BlogPostEventDispatcher
extends java.lang.Object

Dispatcher for BlogPostEvents. Register BlogPostListeners at runtime using the addListener(BlogPostListener) method, or add a child Jive Property to the key "eventListeners.BlogPostListener" to register a listener that will persist across restarts.

For example, to register the com.acme.CustomBlogPostListener 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.BlogPostListener.customBlogPostListener", "com.acme.CustomBlogPostListener.class"); // now add it for this runtime instance BlogPostEventDispatcher.addListener(new com.acme.CustomerBlogPostListener());


Method Summary
 void addListener(BlogPostListener listener)
           
static void destroy()
          Destroy dispatcher.
 void dispatchEvent(BlogPostEvent event)
           
static BlogPostEventDispatcher getInstance()
           
 void removeListener(BlogPostListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BlogPostEventDispatcher getInstance()

addListener

public void addListener(BlogPostListener listener)

removeListener

public void removeListener(BlogPostListener listener)

destroy

public static void destroy()
Destroy dispatcher. Intended to be used primarily during testing.


dispatchEvent

public void dispatchEvent(BlogPostEvent event)

Clearspace Project Page

Copyright © 1999-2007 Jive Software.