KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > server > LifecycleEventContext


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  * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
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
32 package com.sun.appserv.server;
33
34 import javax.naming.InitialContext JavaDoc;
35
36 /**
37  * LifecycleEventContext interface exposes the server-wide runtime environment
38  * that is created by ApplicationServer. This context has only accessors and
39  * is a subset of ServerContext used by the server runtime.
40  */

41 public interface LifecycleEventContext {
42     /**
43      * Get the server command-line arguments
44      */

45     public String JavaDoc[] getCmdLineArgs();
46
47     /**
48      * Get server install root
49      */

50     public String JavaDoc getInstallRoot();
51     
52     /**
53      * Get the server instance name
54      */

55     public String JavaDoc getInstanceName();
56     
57     /**
58      * Get the initial naming context.
59      */

60     public InitialContext JavaDoc getInitialContext();
61
62     /**
63      * Writes the specified message to a server log file.
64      *
65      * @param message a <code>String</code> specifying the
66      * message to be written to the log file
67      */

68     public void log(String JavaDoc message);
69     
70     /**
71      * Writes an explanatory message and a stack trace
72      * for a given <code>Throwable</code> exception
73      * to the server log file.
74      *
75      * @param message a <code>String</code> that
76      * describes the error or exception
77      *
78      * @param throwable the <code>Throwable</code> error
79      * or exception
80      */

81     
82     public void log(String JavaDoc message, Throwable JavaDoc throwable);
83 }
84
Popular Tags