FileDocCategorySizeDatePackage
AxisHTTPSessionListener.javaAPI DocApache Axis 1.42552Sat Apr 22 18:57:26 BST 2006org.apache.axis.transport.http

AxisHTTPSessionListener

public class AxisHTTPSessionListener extends Object implements HttpSessionListener
A simple listener for Servlet 2.3 session lifecycle events.
web.listener
author
Glen Daniels (gdaniels@apache.org)

Fields Summary
protected static Log
log
Constructors Summary
Methods Summary
static voiddestroySession(javax.servlet.http.HttpSession session)
Static method to destroy all ServiceLifecycle objects within an Axis session.

    
                     
       
    
        // Check for our marker so as not to do unneeded work
        if (session.getAttribute(AxisHttpSession.AXIS_SESSION_MARKER) == null)
            return;
        
        if (log.isDebugEnabled()) {
            log.debug("Got destroySession event : " + session);
        }
        
        Enumeration e = session.getAttributeNames();
        while (e.hasMoreElements()) {
            Object next = e.nextElement();
            if (next instanceof ServiceLifecycle) {
                ((ServiceLifecycle)next).destroy();
            }
        }
    
public voidsessionCreated(javax.servlet.http.HttpSessionEvent event)
No-op for now

    
public voidsessionDestroyed(javax.servlet.http.HttpSessionEvent event)
Called when a session is destroyed by the servlet engine. We use the relevant HttpSession to look up an AxisHttpSession, and destroy all the appropriate objects stored therein.

param
event the event descriptor passed in by the servlet engine

        HttpSession session = event.getSession();
        destroySession(session);