Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.event
Class UserEventDispatcher

    java.lang.Object
      org.jivesoftware.openfire.event.UserEventDispatcher

    public class UserEventDispatcher

extends Object

Dispatches user events. Each event has a `type` and optional parameters, as follows:

Event Type | Extra Params
--- | ---
`user_created` | None
`user_deleting` | None
`user_modified` |
Reason | Key | Value
Name modified
| type | nameModified
| originalValue | (Name before it was modified)
Email modified
| type | emailModified
| originalValue | (Email before it was modified)
Password modified
| type | passwordModified
Creation date modified
| type | creationDateModified
| originalValue | (Creation date before it was modified)
Modification date modified
| type | modificationDateModified
| originalValue | (Modification date 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
`static class` | `UserEventDispatcher.EventType` Represents valid event types.

Method Summary
`static void` | `addListener(UserEventListener listener)` Registers a listener to receive events.
`static void` | `dispatchEvent(User user, UserEventDispatcher.EventType eventType, Map<String,Object> params)` Dispatches an event to all listeners.
`static void` | `removeListener(UserEventListener listener)` Unregisters a listener to receive events.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### addListener

    public static void addListener(UserEventListener listener)

  Registers a listener to receive events.

  Parameters:
    `listener` - the listener.

### removeListener

    public static void removeListener(UserEventListener listener)

  Unregisters a listener to receive events.

  Parameters:
    `listener` - the listener.

### dispatchEvent

    public static void dispatchEvent(User user,
                                     UserEventDispatcher.EventType eventType,
                                     Map<String,Object> params)

  Dispatches an event to all listeners.

  Parameters:
    `user` - the user.
    `eventType` - the event type.
    `params` - event parameters.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.