Package org.jivesoftware.util
Class PropertyEventDispatcher
- java.lang.Object
-
- org.jivesoftware.util.PropertyEventDispatcher
-
public class PropertyEventDispatcher extends Object
Dispatches property events. Each event has atypeand optional parameters, as follows:The params for each event type Event Type Extra Params property_setA param named valuethat has the value of the property set.property_deletedNone xml_property_setA param named valuethat has the value of the property set.xml_property_deletedNone - Author:
- Matt Tucker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPropertyEventDispatcher.EventTypeRepresents valid event types.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddListener(PropertyEventListener listener)Registers a listener to receive events.static voiddispatchEvent(String property, PropertyEventDispatcher.EventType eventType, Map<String,Object> params)Dispatches an event to all listeners.static voidremoveListener(PropertyEventListener listener)Unregisters a listener to receive events.
-
-
-
Method Detail
-
addListener
public static void addListener(PropertyEventListener listener)
Registers a listener to receive events.- Parameters:
listener- the listener.
-
removeListener
public static void removeListener(PropertyEventListener listener)
Unregisters a listener to receive events.- Parameters:
listener- the listener.
-
dispatchEvent
public static void dispatchEvent(String property, PropertyEventDispatcher.EventType eventType, Map<String,Object> params)
Dispatches an event to all listeners.- Parameters:
property- the property.eventType- the event type.params- event parameters.
-
-