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 /**
21 * Implementations of this interface receive notifications about
22 * changes to the servlet context of the web application they are
23 * part of.
24 * To receive notification events, the implementation class
25 * must be configured in the deployment descriptor for the web
26 * application.
27 * @see ServletContextEvent
28 * @since v 2.3
29 */
30
31 public interface ServletContextListener extends EventListener {
32 /**
33 ** Notification that the web application initialization
34 ** process is starting.
35 ** All ServletContextListeners are notified of context
36 ** initialization before any filter or servlet in the web
37 ** application is initialized.
38 */
39
40 public void contextInitialized(ServletContextEvent sce);
41
42 /**
43 ** Notification that the servlet context is about to be shut down.
44 ** All servlets and filters have been destroy()ed before any
45 ** ServletContextListeners are notified of context
46 ** destruction.
47 */
48 public void contextDestroyed(ServletContextEvent sce);
49 }
|