001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019
020 package javax.servlet;
021
022 import java.util.EventListener;
023
024 /**
025 * A ServletRequestAttributeListener can be implemented by the
026 * developer interested in being notified of request attribute
027 * changes. Notifications will be generated while the request
028 * is within the scope of the web application in which the listener
029 * is registered. A request is defined as coming into scope when
030 * it is about to enter the first servlet or filter in each web
031 * application, as going out of scope when it exits the last servlet
032 * or the first filter in the chain.
033 *
034 * @since Servlet 2.4
035 * @version $Rev: 835965 $ $Date: 2009-11-13 14:40:44 -0500 (Fri, 13 Nov 2009) $
036 */
037
038 public interface ServletRequestAttributeListener extends EventListener {
039 /**
040 * Notification that a new attribute was added to the
041 * * servlet request. Called after the attribute is added.
042 * @param srae event for attribute added
043 */
044 void attributeAdded(ServletRequestAttributeEvent srae);
045
046 /**
047 * Notification that an existing attribute has been removed from the
048 * * servlet request. Called after the attribute is removed.
049 * @param srae event for attribute removed
050 */
051 void attributeRemoved(ServletRequestAttributeEvent srae);
052
053 /**
054 * Notification that an attribute was replaced on the
055 * * servlet request. Called after the attribute is replaced.
056 * @param srae event for attribute replaced
057 */
058 void attributeReplaced(ServletRequestAttributeEvent srae);
059 }
060