Search in sources :

Example 1 with SessionEvent

use of org.apache.catalina.SessionEvent in project tomcat by apache.

the class StandardSessionContext method fireSessionEvent.

// ------------------------------------------------------ Protected Methods
/**
     * Notify all session event listeners that a particular event has
     * occurred for this Session.  The default implementation performs
     * this notification synchronously using the calling thread.
     *
     * @param type Event type
     * @param data Event data
     */
public void fireSessionEvent(String type, Object data) {
    if (listeners.size() < 1)
        return;
    SessionEvent event = new SessionEvent(this, type, data);
    SessionListener[] list = new SessionListener[0];
    synchronized (listeners) {
        list = listeners.toArray(list);
    }
    for (int i = 0; i < list.length; i++) {
        (list[i]).sessionEvent(event);
    }
}
Also used : HttpSessionEvent(javax.servlet.http.HttpSessionEvent) SessionEvent(org.apache.catalina.SessionEvent) HttpSessionListener(javax.servlet.http.HttpSessionListener) SessionListener(org.apache.catalina.SessionListener)

Aggregations

HttpSessionEvent (javax.servlet.http.HttpSessionEvent)1 HttpSessionListener (javax.servlet.http.HttpSessionListener)1 SessionEvent (org.apache.catalina.SessionEvent)1 SessionListener (org.apache.catalina.SessionListener)1