1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *  http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package javax.servlet.http;
21  
22  import java.util.EventListener;
23  
24  /**
25   * Causes an object to be notified when it is bound to
26   * or unbound from a session. The object is notified
27   * by an {@link HttpSessionBindingEvent} object. This may be as a result
28   * of a servlet programmer explicitly unbinding an attribute from a session,
29   * due to a session being invalidated, or due to a session timing out.
30   *
31   *
32   * @author		Various
33   * @version		$Version$
34   *
35   * @see HttpSession
36   * @see HttpSessionBindingEvent
37   */
38  public interface HttpSessionBindingListener extends EventListener {
39      /**
40       *
41       * Notifies the object that it is being bound to
42       * a session and identifies the session.
43       *
44       * @param event		the event that identifies the
45       *				session 
46       *
47       * @see #valueUnbound
48       *
49       */ 
50  
51      public void valueBound(HttpSessionBindingEvent event);
52      
53      
54  
55      /**
56       *
57       * Notifies the object that it is being unbound
58       * from a session and identifies the session.
59       *
60       * @param event		the event that identifies
61       *				the session 
62       *	
63       * @see #valueBound
64       *
65       */
66  
67      public void valueUnbound(HttpSessionBindingEvent event);
68      
69      
70  }
71