Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.event
Class AttachmentEventDispatcher

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

public class AttachmentEventDispatcher
extends Object

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

For example, to register the com.acme.CustomAttachmentListener 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.AttachmentListener.customAttachmentListener", "com.acme.CustomAttachmentListener.class"); // now add it for this runtime instance AttachmentEventDispatcher.addListener(new com.acme.CustomerAttachmentListener());


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

Method Detail

getInstance

public static AttachmentEventDispatcher getInstance()

addListener

public void addListener(AttachmentListener listener)

removeListener

public void removeListener(AttachmentListener listener)

destroy

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


dispatchEvent

public void dispatchEvent(AttachmentEvent event)

Clearspace Project Page

Copyright © 1999-2007 Jive Software.