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 /** Implementations of this interface receive notifications of
21 ** changes to the attribute list on the servlet context of a web application.
22 * To receive notification events, the implementation class
23 * must be configured in the deployment descriptor for the web application.
24 * @see ServletContextAttributeEvent
25 * @since v 2.3
26 */
27
28 public interface ServletContextAttributeListener extends EventListener {
29 /** Notification that a new attribute was added to the servlet context. Called after the attribute is added.*/
30 public void attributeAdded(ServletContextAttributeEvent scab);
31
32 /** Notification that an existing attribute has been removed from the servlet context. Called after the attribute is removed.*/
33 public void attributeRemoved(ServletContextAttributeEvent scab);
34
35 /** Notification that an attribute on the servlet context has been replaced. Called after the attribute is replaced. */
36 public void attributeReplaced(ServletContextAttributeEvent scab);
37 }
|