View Javadoc

1   
2   
3   /*
4    * The contents of this file are subject to the terms
5    * of the Common Development and Distribution License
6    * (the "License").  You may not use this file except
7    * in compliance with the License.
8    *
9    * You can obtain a copy of the license at
10   * glassfish/bootstrap/legal/CDDLv1.0.txt or
11   * https://glassfish.dev.java.net/public/CDDLv1.0.html.
12   * See the License for the specific language governing
13   * permissions and limitations under the License.
14   *
15   * When distributing Covered Code, include this CDDL
16   * HEADER in each file and include the License file at
17   * glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
18   * add the following below this CDDL HEADER, with the
19   * fields enclosed by brackets "[]" replaced with your
20   * own identifying information: Portions Copyright [yyyy]
21   * [name of copyright owner]
22   *
23   * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24   *
25   * Portions Copyright Apache Software Foundation.
26   */
27  
28  package javax.servlet;
29  
30  import java.util.EventListener;
31  
32      /**
33       * A ServletRequestAttributeListener can be implemented by the
34       * developer interested in being notified of request attribute
35       * changes. Notifications will be generated while the request
36       * is within the scope of the web application in which the listener
37       * is registered. A request is defined as coming into scope when
38       * it is about to enter the first servlet or filter in each web
39       * application, as going out of scope when it exits the last servlet
40       * or the first filter in the chain.
41       *
42       * @since Servlet 2.4
43       */
44  
45  public interface ServletRequestAttributeListener extends EventListener {
46      /** Notification that a new attribute was added to the
47       ** servlet request. Called after the attribute is added.
48       */
49      public void attributeAdded(ServletRequestAttributeEvent srae);
50  
51      /** Notification that an existing attribute has been removed from the
52       ** servlet request. Called after the attribute is removed.
53       */
54      public void attributeRemoved(ServletRequestAttributeEvent srae);
55  
56      /** Notification that an attribute was replaced on the
57       ** servlet request. Called after the attribute is replaced.
58       */
59      public void attributeReplaced(ServletRequestAttributeEvent srae);
60  }
61