Package org.jivesoftware.openfire.http
Class SessionEventDispatcher
java.lang.Object
org.jivesoftware.openfire.http.SessionEventDispatcher
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
addListener
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
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
-