01 /*
02 * Copyright 2004 The Apache Software Foundation
03 *
04 * Licensed under the Apache License, Version 2.0 (the "License");
05 * you may not use this file except in compliance with the License.
06 * You may obtain a copy of the License at
07 *
08 * http://www.apache.org/licenses/LICENSE-2.0
09 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package javax.servlet.http;
18
19 import java.util.EventListener;
20
21 /**
22 * Causes an object to be notified when it is bound to
23 * or unbound from a session. The object is notified
24 * by an {@link HttpSessionBindingEvent} object. This may be as a result
25 * of a servlet programmer explicitly unbinding an attribute from a session,
26 * due to a session being invalidated, or due to a session timing out.
27 *
28 *
29 * @author Various
30 * @version $Version$
31 *
32 * @see HttpSession
33 * @see HttpSessionBindingEvent
34 *
35 */
36
37 public interface HttpSessionBindingListener extends EventListener {
38
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 * Notifies the object that it is being unbound
56 * from a session and identifies the session.
57 *
58 * @param event the event that identifies
59 * the session
60 *
61 * @see #valueBound
62 *
63 */
64
65 public void valueUnbound(HttpSessionBindingEvent event);
66
67 }
|