Class SessionEventDispatcher


  • public class SessionEventDispatcher
    extends Object
    • Method Detail

      • addListener

        public static void addListener​(SessionListener listener)
        Adds a SessionListener to this session. The listener will be notified of changes to the session.
        Parameters:
        listener - the listener which is being added to the session.
      • removeListener

        public static void removeListener​(SessionListener listener)
        Removes a SessionListener from this session. The listener will no longer be updated when an event occurs on the session.
        Parameters:
        listener - the session listener that is to be removed.
      • dispatchEvent

        public static void dispatchEvent​(HttpSession session,
                                         SessionEventDispatcher.EventType eventType,
                                         HttpConnection connection,
                                         javax.servlet.AsyncContext context)
        Dispatches an event related to a particular BOSH session to all registered listeners.
        Parameters:
        session - The session that relates to the event (can be null when the event type is 'pre_session_created').
        eventType - The type of the event (cannot be null).
        connection - The connection where the event originated.
        context - The servlet context of the event