Openfire 3.9.3 Javadoc

org.jivesoftware.openfire.user
Class PresenceEventDispatcher

java.lang.Object
  extended by org.jivesoftware.openfire.user.PresenceEventDispatcher

public class PresenceEventDispatcher
extends Object

Dispatches presence events. The following events are supported:

Use addListener(PresenceEventListener) and removeListener(PresenceEventListener) to add or remove PresenceEventListener.

Author:
Gaston Dombiak

Constructor Summary
PresenceEventDispatcher()
           
 
Method Summary
static void addListener(PresenceEventListener listener)
          Registers a listener to receive events.
static void availableSession(ClientSession session, org.xmpp.packet.Presence presence)
          Notification message indicating that a session that was not available is now available.
static void presenceChanged(ClientSession session, org.xmpp.packet.Presence presence)
          Notification message indicating that an available session has changed its presence.
static void removeListener(PresenceEventListener listener)
          Unregisters a listener to receive events.
static void subscribedToPresence(org.xmpp.packet.JID subscriberJID, org.xmpp.packet.JID authorizerJID)
          Notification message indicating that a user has successfully subscribed to the presence of another user.
static void unavailableSession(ClientSession session, org.xmpp.packet.Presence presence)
          Notification message indicating that a session that was available is no longer available.
static void unsubscribedToPresence(org.xmpp.packet.JID unsubscriberJID, org.xmpp.packet.JID recipientJID)
          Notification message indicating that a user has unsubscribed to the presence of another user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceEventDispatcher

public PresenceEventDispatcher()
Method Detail

addListener

public static void addListener(PresenceEventListener listener)
Registers a listener to receive events.

Parameters:
listener - the listener.

removeListener

public static void removeListener(PresenceEventListener listener)
Unregisters a listener to receive events.

Parameters:
listener - the listener.

availableSession

public static void availableSession(ClientSession session,
                                    org.xmpp.packet.Presence presence)
Notification message indicating that a session that was not available is now available. A session becomes available when an available presence is received. Sessions that are available will have a route in the routing table thus becoming eligible for receiving messages (in particular messages sent to the user bare JID).

Parameters:
session - the session that is now available.
presence - the received available presence.

unavailableSession

public static void unavailableSession(ClientSession session,
                                      org.xmpp.packet.Presence presence)
Notification message indicating that a session that was available is no longer available. A session becomes unavailable when an unavailable presence is received. The entity may still be connected to the server and may send an available presence later to indicate that communication can proceed.

Parameters:
session - the session that is no longer available.
presence - the received unavailable presence.

presenceChanged

public static void presenceChanged(ClientSession session,
                                   org.xmpp.packet.Presence presence)
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.

Parameters:
session - the affected session.
presence - the received available presence with the new information.

subscribedToPresence

public static void subscribedToPresence(org.xmpp.packet.JID subscriberJID,
                                        org.xmpp.packet.JID authorizerJID)
Notification message indicating that a user has successfully subscribed to the presence of another user.

Parameters:
subscriberJID - the user that initiated the subscription.
authorizerJID - the user that authorized the subscription.

unsubscribedToPresence

public static void unsubscribedToPresence(org.xmpp.packet.JID unsubscriberJID,
                                          org.xmpp.packet.JID recipientJID)
Notification message indicating that a user has unsubscribed to the presence of another user.

Parameters:
unsubscriberJID - the user that initiated the unsubscribe request.
recipientJID - the recipient user of the unsubscribe request.

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.