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);
}
}
Aggregations