public static void presenceChanged(ClientSession session, Presence presence) {
        if (!listeners.isEmpty()) {
            for (PresenceEventListener listener : listeners) {
                try {
                    listener.presenceChanged(session, presence); 
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'presenceChanged' event!", e);
                }
            }
        }
    }
Notification message indicating that an available session has changed its
presence. This is the case when the user presence changed the show value
(e.g. away, dnd, etc.) or the presence status message.

@param session the affected session.
@param presence the received available presence with the new information.
xmppserver/src/main/java/org/jivesoftware/openfire/user/PresenceEventDispatcher.java