1 package org.apache.turbine.services.session; 2 3 18 19 import java.io.Serializable ; 20 import javax.servlet.http.HttpSessionActivationListener ; 21 import javax.servlet.http.HttpSessionEvent ; 22 import javax.servlet.http.HttpSessionListener ; 23 24 53 public class SessionListener 54 implements HttpSessionListener , HttpSessionActivationListener , Serializable 55 { 56 58 63 public void sessionCreated(HttpSessionEvent event) 64 { 65 TurbineSession.addSession(event.getSession()); 66 event.getSession().setAttribute(getClass().getName(), this); 67 } 68 69 74 public void sessionDestroyed(HttpSessionEvent event) 75 { 76 TurbineSession.removeSession(event.getSession()); 77 } 78 79 80 82 88 public void sessionDidActivate(HttpSessionEvent event) 89 { 90 TurbineSession.addSession(event.getSession()); 91 } 92 93 99 public void sessionWillPassivate(HttpSessionEvent event) 100 { 101 TurbineSession.removeSession(event.getSession()); 102 } 103 } 104 | Popular Tags |