Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.event
Class AvatarEventDispatcher

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

public class AvatarEventDispatcher
extends Object

Dispatcher for AvatarEvents. Register AvatarListeners at runtime using the addListener(com.jivesoftware.community.event.AvatarListener) method, or add a child Jive Property to the key "eventListeners.AvatarListener" to register a listener that will persist across restarts.

For example, to register the com.acme.CustomAvatarListener 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.AvatarListener.customAvatarListener", "com.acme.CustomAvatarListener.class"); // now add it for this runtime instance AvatarEventDispatcher.addListener(new com.acme.CustomerAvatarListener());


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

Method Detail

getInstance

public static AvatarEventDispatcher getInstance()

addListener

public void addListener(AvatarListener listener)

removeListener

public void removeListener(AvatarListener listener)

destroy

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


dispatchEvent

public void dispatchEvent(AvatarEvent event)

Clearspace Project Page

Copyright © 1999-2007 Jive Software.