KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > server > event > ApplicationLoaderEventListener


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * @(#) ApplicationLoaderEventListener.java
26  *
27  * Copyright 2000-2001 by iPlanet/Sun Microsystems, Inc.,
28  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
29  * All rights reserved.
30  *
31  * This software is the confidential and proprietary information
32  * of iPlanet/Sun Microsystems, Inc. ("Confidential Information").
33  * You shall not disclose such Confidential Information and shall
34  * use it only in accordance with the terms of the license
35  * agreement you entered into with iPlanet/Sun Microsystems.
36  */

37 package com.sun.enterprise.server.event;
38
39 /**
40  * Listener to receive Allication and EjbContainer events.
41  */

42 public interface ApplicationLoaderEventListener {
43
44     /**
45      * This method is invoked whenever an App is loaded/unloaded
46      *
47      * ApplicationEvent.getEventType() specifies the exact
48      * application event. Note that, this method is called
49      * event for stand alone modules.
50      * ApplicationEvent.getApplication().isVirtual() will be
51      * true for stand-alone module and false otherwise.
52      *
53      * Generally, APPLICATION events are sent in the following order
54      * a) BEFORE_APPLICATION_LOADED
55      * b) AFTER_APPLICATION_LOADED
56      * c) BEFORE_APPLICATION_UNLOADED
57      * d) AFTER_APPLICATION_UNLOADED
58      *
59      * Note:-
60      * There are some cases, when AFTER_APPLICATION_LOADED and
61      * BEFORE_APPLICATION_UNLOAD will not be sent to listeners.
62      * In particular, if an Ejb cannot be loaded successfully
63      * then no AFTER_APPLICATION_LOADED and BEFORE_APPLICATION_UNLOAD
64      * will be sent to the listeners.
65      *
66      */

67     public void handleApplicationEvent(ApplicationEvent event);
68
69     /**
70      * This method is invoked whenever an EjbContainer is loaded/unloaded
71      *
72      * EjbContainerEvent.getEventType() specifies the exact
73      * EjbContainer event. Note that, this method is called
74      * event for stand alone modules.
75      * EjbContainerEvent.getApplication().isVirtual() will be
76      * true for stand-alone module and false otherwise.
77      *
78      * Generally, EjbContainer Events are sent in the following order
79      * a) BEFORE_EJB_CONTAINER_LOADED
80      * b) AFTER_EJB_CONTAINER_LOADED
81      * c) BEFORE_EJB_CONTAINER_UNLOADED
82      * d) AFTER_EJB_CONTAINER_UNLOADED
83      *
84      */

85     public void handleEjbContainerEvent(EjbContainerEvent event);
86
87 }
88
Popular Tags