001 /*
002 * Copyright (c) 2009 The openGion Project.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
013 * either express or implied. See the License for the specific language
014 * governing permissions and limitations under the License.
015 */
016 package org.opengion.hayabusa.common;
017
018 import javax.servlet.http.HttpSession ;
019 import javax.servlet.http.HttpSessionListener;
020 import javax.servlet.http.HttpSessionEvent;
021
022 /**
023 * HttpSessionListener を実è£?—ãŸã?ã‚»ãƒ?‚·ãƒ§ãƒ³çŠ¶æ…‹ã?監視リスナã?クラスã§ã™ã?
024 * ã“れã¯ã€ã‚»ãƒ?‚·ãƒ§ãƒ³ã®ä½œæ?/ç ´æ£?‚’監視ã§ãã¾ã™ã?
025 * ã“ã?リスナã?ã¯ã€WEB-INF/web.xml ã§ã€çµ?¿è¾¼ã¿ã¾ã™ã?
026 *
027 * ã€WEB-INF/web.xmlã€?
028 *
029 * <listener>
030 * <listener-class>
031 * org.opengion.hayabusa.common.HybsSessionListener
032 * </listener-class>
033 * </listener>
034 *
035 * @og.group ãƒã‚°ã‚¤ãƒ³åˆ¶å¾¡
036 *
037 * @version 4.0
038 * @author Kazuhiko Hasegawa
039 * @since JDK5.0,
040 */
041 public class HybsSessionListener implements HttpSessionListener {
042
043 /**
044 * HttpSessionListener インターフェースã®å®Ÿè£?
045 *
046 * ã‚»ãƒ?‚·ãƒ§ãƒ³ãŒä½œæ?ã•れãŸã¨ãã«ãƒªã‚¹ãƒŠã?ã«é€šçŸ¥ã•れるã?
047 * ç¾æ®µéšŽã§ã¯ã€ãªã«ã‚‚ã—ãªã??
048 *
049 * @param event ã‚»ãƒ?‚·ãƒ§ãƒ³ã‚¤ãƒ™ãƒ³ãƒ?
050 */
051 @Override
052 public void sessionCreated( final HttpSessionEvent event ) {
053 // taglib\HeadTag.java ã«ç§»å‹?
054 // HttpSession session = event.getSession();
055 // SystemManager.addSession( session );
056 }
057
058 /**
059 * HttpSessionListener インターフェースã®å®Ÿè£?
060 *
061 * ã‚»ãƒ?‚·ãƒ§ãƒ³ãŒç?æ£?•れãŸã¨ãã«ãƒªã‚¹ãƒŠã?ã«é€šçŸ¥ã•れるã?
062 *
063 * @og.rev 5.5.9.1 (2012/12/07) SystemManager ã«æ¸¡ã™ã?ã¯ã€sessionID ã§ã¯ãªãã?session オブジェクトã¨ã™ã‚‹ã€?
064 *
065 * @param event ã‚»ãƒ?‚·ãƒ§ãƒ³ã‚¤ãƒ™ãƒ³ãƒ?
066 */
067 @Override
068 public void sessionDestroyed( final HttpSessionEvent event ) {
069 HttpSession session = event.getSession();
070 // String sessionID = session.getId();
071 // SystemManager.removeSession( sessionID );
072 SystemManager.removeSession( session ); // 5.5.9.1 (2012/12/07)
073 }
074 }