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