1
2
3 /*
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5 *
6 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
7 *
8 * Portions Copyright Apache Software Foundation.
9 *
10 * The contents of this file are subject to the terms of either the GNU
11 * General Public License Version 2 only ("GPL") or the Common Development
12 * and Distribution License("CDDL") (collectively, the "License"). You
13 * may not use this file except in compliance with the License. You can obtain
14 * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
15 * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
16 * language governing permissions and limitations under the License.
17 *
18 * When distributing the software, include this License Header Notice in each
19 * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
20 * Sun designates this particular file as subject to the "Classpath" exception
21 * as provided by Sun in the GPL Version 2 section of the License file that
22 * accompanied this code. If applicable, add the following below the License
23 * Header, with the fields enclosed by brackets [] replaced by your own
24 * identifying information: "Portions Copyrighted [year]
25 * [name of copyright owner]"
26 *
27 * Contributor(s):
28 *
29 * If you wish your version of this file to be governed by only the CDDL or
30 * only the GPL Version 2, indicate your decision by adding "[Contributor]
31 * elects to include this software in this distribution under the [CDDL or GPL
32 * Version 2] license." If you don't indicate a single choice of license, a
33 * recipient has the option to distribute your version of this file under
34 * either the CDDL, the GPL Version 2 or to extend the choice of license to
35 * its licensees as provided above. However, if you add GPL Version 2 code
36 * and therefore, elected the GPL Version 2 license, then the option applies
37 * only if the new code is made subject to such option by the copyright
38 * holder.
39 */
40
41 package javax.servlet;
42
43 import java.util.EventListener;
44
45 /**
46 * A ServletRequestAttributeListener can be implemented by the
47 * developer interested in being notified of request attribute
48 * changes. Notifications will be generated while the request
49 * is within the scope of the web application in which the listener
50 * is registered. A request is defined as coming into scope when
51 * it is about to enter the first servlet or filter in each web
52 * application, as going out of scope when it exits the last servlet
53 * or the first filter in the chain.
54 *
55 * @since Servlet 2.4
56 */
57
58 public interface ServletRequestAttributeListener extends EventListener {
59 /** Notification that a new attribute was added to the
60 ** servlet request. Called after the attribute is added.
61 */
62 public void attributeAdded(ServletRequestAttributeEvent srae);
63
64 /** Notification that an existing attribute has been removed from the
65 ** servlet request. Called after the attribute is removed.
66 */
67 public void attributeRemoved(ServletRequestAttributeEvent srae);
68
69 /** Notification that an attribute was replaced on the
70 ** servlet request. Called after the attribute is replaced.
71 */
72 public void attributeReplaced(ServletRequestAttributeEvent srae);
73 }
74