Package org.jivesoftware.openfire.http
Class SessionEventDispatcher
- java.lang.Object
-
- org.jivesoftware.openfire.http.SessionEventDispatcher
-
public class SessionEventDispatcher extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SessionEventDispatcher.EventType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addListener(SessionListener listener)
Adds aSessionListener
to this session.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.static void
removeListener(SessionListener listener)
Removes aSessionListener
from this session.
-
-
-
Method Detail
-
addListener
public static void addListener(SessionListener listener)
Adds aSessionListener
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 aSessionListener
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
-
-