1 2 3 /* 4 * The contents of this file are subject to the terms 5 * of the Common Development and Distribution License 6 * (the "License"). You may not use this file except 7 * in compliance with the License. 8 * 9 * You can obtain a copy of the license at 10 * glassfish/bootstrap/legal/CDDLv1.0.txt or 11 * https://glassfish.dev.java.net/public/CDDLv1.0.html. 12 * See the License for the specific language governing 13 * permissions and limitations under the License. 14 * 15 * When distributing Covered Code, include this CDDL 16 * HEADER in each file and include the License file at 17 * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 18 * add the following below this CDDL HEADER, with the 19 * fields enclosed by brackets "[]" replaced with your 20 * own identifying information: Portions Copyright [yyyy] 21 * [name of copyright owner] 22 * 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * 25 * Portions Copyright Apache Software Foundation. 26 */ 27 28 29 package javax.servlet.http; 30 31 import java.util.EventListener; 32 33 34 35 36 37 /** 38 * Causes an object to be notified when it is bound to 39 * or unbound from a session. The object is notified 40 * by an {@link HttpSessionBindingEvent} object. This may be as a result 41 * of a servlet programmer explicitly unbinding an attribute from a session, 42 * due to a session being invalidated, or due to a session timing out. 43 * 44 * 45 * @author Various 46 * 47 * @see HttpSession 48 * @see HttpSessionBindingEvent 49 * 50 */ 51 52 public interface HttpSessionBindingListener extends EventListener { 53 54 55 56 /** 57 * 58 * Notifies the object that it is being bound to 59 * a session and identifies the session. 60 * 61 * @param event the event that identifies the 62 * session 63 * 64 * @see #valueUnbound 65 * 66 */ 67 68 public void valueBound(HttpSessionBindingEvent event); 69 70 71 72 /** 73 * 74 * Notifies the object that it is being unbound 75 * from a session and identifies the session. 76 * 77 * @param event the event that identifies 78 * the session 79 * 80 * @see #valueBound 81 * 82 */ 83 84 public void valueUnbound(HttpSessionBindingEvent event); 85 86 87 } 88