Package org.huihoo.workflow.deploy

Source Code of org.huihoo.workflow.deploy.SessionDestroyer

//----------------------------BEGIN LICENSE----------------------------
/*
* Willow : the Open Source WorkFlow Project
* Distributable under GNU LGPL license by gun.org
*
* Copyright (C) 2004-2010 huihoo.org
* Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com>
*
* ====================================================================
* Project Homepage : http://www.huihoo.org/willow
* Source Forge     : http://sourceforge.net/projects/huihoo
* Mailing list     : willow@lists.sourceforge.net
*/
//----------------------------END  LICENSE----------------------------
package org.huihoo.workflow.deploy;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.huihoo.workflow.runtime.WorkflowSession;


/**
* @author reic
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class SessionDestroyer  implements HttpSessionListener
{
  /**
   * Record the fact that a session has been created.
   *
   * @param event The session event
   */
  public void sessionCreated(HttpSessionEvent event)
  {
  }

  /**
   * Record the fact that a session has been destroyed.
   *
   * @param event The session event
   */
  public void sessionDestroyed(HttpSessionEvent event)
  {
    HttpSession session=event.getSession();
    WorkflowSession workflowSession=(WorkflowSession)session.getAttribute(Constants.WORKFLOW_CLIENT_SESSION);
    if(workflowSession!=null)
    {
      session.removeAttribute(Constants.WORKFLOW_CLIENT_SESSION);
      workflowSession.invalidate();
    }
  }

}
TOP

Related Classes of org.huihoo.workflow.deploy.SessionDestroyer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.