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 */ 036 037 public interface ServletRequestAttributeListener extends EventListener { 038 /** Notification that a new attribute was added to the 039 ** servlet request. Called after the attribute is added. 040 */ 041 public void attributeAdded(ServletRequestAttributeEvent srae); 042 043 /** Notification that an existing attribute has been removed from the 044 ** servlet request. Called after the attribute is removed. 045 */ 046 public void attributeRemoved(ServletRequestAttributeEvent srae); 047 048 /** Notification that an attribute was replaced on the 049 ** servlet request. Called after the attribute is replaced. 050 */ 051 public void attributeReplaced(ServletRequestAttributeEvent srae); 052 } 053