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 voidaddListener(SessionListener listener) Adds aSessionListenerto this session.static voiddispatchEvent(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 voidremoveListener(SessionListener listener) Removes aSessionListenerfrom this session.
-
Method Details
-
addListener
Adds aSessionListenerto 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 aSessionListenerfrom 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
-