Package org.jivesoftware.util
Class PropertyEventDispatcher
java.lang.Object
org.jivesoftware.util.PropertyEventDispatcher
Dispatches property events. Each event has a
type
and optional parameters, as follows:
Event Type | Extra Params |
---|---|
property_set | A param named value that
has the value of the property set. |
property_deleted | None |
xml_property_set | A param named value that
has the value of the property set. |
xml_property_deleted | None |
- Author:
- Matt Tucker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents valid event types. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addListener
(PropertyEventListener listener) Registers a listener to receive events.static void
dispatchEvent
(String property, PropertyEventDispatcher.EventType eventType, Map<String, Object> params) Dispatches an event to all listeners.static void
removeListener
(PropertyEventListener listener) Unregisters a listener to receive events.
-
Method Details
-
addListener
Registers a listener to receive events.- Parameters:
listener
- the listener.
-
removeListener
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.
-