Package org.jivesoftware.openfire.event
Class GroupEventDispatcher
- java.lang.Object
-
- org.jivesoftware.openfire.event.GroupEventDispatcher
-
public class GroupEventDispatcher extends Object
Dispatches group events. Each event has atype
and optional parameters, as follows:The params for each event type Event Type Extra Params group_created
None group_deleting
None member_added
A param named member
with a String username as a payloadmember_removed
A param named member
with a String username as a payloadadmin_added
A param named admin
with a String username as a payloadadmin_removed
A param named admin
with a String username as a payloadgroup_modified
The params for a group modified event Reason Key Value Name modified type nameModified originalValue (Name before it was modified) Description modified type descriptionModified originalValue (Description before it was modified) Property modified type propertyModified propertyKey (Name of the property) originalValue (Property value before it was modified) Property added type propertyAdded propertyKey (Name of the new property) Property deleted type propertyDeleted propertyKey (Name of the property deleted) - Author:
- Matt Tucker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroupEventDispatcher.EventType
Represents valid event types.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addListener(GroupEventListener listener)
Registers a listener to receive events.static void
dispatchEvent(Group group, GroupEventDispatcher.EventType eventType, Map params)
Dispatches an event to all listeners.static void
removeListener(GroupEventListener listener)
Unregisters a listener to receive events.
-
-
-
Method Detail
-
addListener
public static void addListener(GroupEventListener listener)
Registers a listener to receive events.- Parameters:
listener
- the listener.
-
removeListener
public static void removeListener(GroupEventListener listener)
Unregisters a listener to receive events.- Parameters:
listener
- the listener.
-
dispatchEvent
public static void dispatchEvent(Group group, GroupEventDispatcher.EventType eventType, Map params)
Dispatches an event to all listeners.- Parameters:
group
- the group.eventType
- the event type.params
- event parameters.
-
-