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 package javax.servlet;
17
18 import java.util.EventListener;
19
20 /**
21 * A ServletRequestAttributeListener can be implemented by the
22 * developer interested in being notified of request attribute
23 * changes. Notifications will be generated while the request
24 * is within the scope of the web application in which the listener
25 * is registered. A request is defined as coming into scope when
26 * it is about to enter the first servlet or filter in each web
27 * application, as going out of scope when it exits the last servlet
28 * or the first filter in the chain.
29 *
30 * @since Servlet 2.4
31 */
32
33 public interface ServletRequestAttributeListener extends EventListener {
34 /** Notification that a new attribute was added to the
35 ** servlet request. Called after the attribute is added.
36 */
37 public void attributeAdded(ServletRequestAttributeEvent srae);
38
39 /** Notification that an existing attribute has been removed from the
40 ** servlet request. Called after the attribute is removed.
41 */
42 public void attributeRemoved(ServletRequestAttributeEvent srae);
43
44 /** Notification that an attribute was replaced on the
45 ** servlet request. Called after the attribute is replaced.
46 */
47 public void attributeReplaced(ServletRequestAttributeEvent srae);
48 }
|