public static void dispatchEvent(User user, EventType eventType, Map<String,Object> params) {
        for (UserEventListener listener : listeners) {
            try {
                switch (eventType) {
                    case user_created: {
                        listener.userCreated(user, params);
                        break;
                    }
                    case user_deleting: {
                        listener.userDeleting(user, params);
                        break;
                    }
                    case user_modified: {
                        listener.userModified(user, params);
                        break;
                    }
                    default:
                        break;
                }
            }
            catch (Exception e) {
                Log.error(e.getMessage(), e);
            }
        }
    }
Dispatches an event to all listeners.

@param user the user.
@param eventType the event type.
@param params event parameters.
xmppserver/src/main/java/org/jivesoftware/openfire/event/UserEventDispatcher.java