KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > server > core > channel > RemoteAdminChannel


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 2001-2002 by iPlanet/Sun Microsystems, Inc.,
28  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
29  * All rights reserved.
30  */

31 package com.sun.enterprise.admin.server.core.channel;
32
33 import java.rmi.Remote JavaDoc;
34 import java.rmi.RemoteException JavaDoc;
35 import com.sun.enterprise.admin.event.AdminEvent;
36 import com.sun.enterprise.admin.event.AdminEventResult;
37
38 /**
39  * Remote interface for admin channel
40  */

41 public interface RemoteAdminChannel extends Remote JavaDoc {
42
43     // WARNING - Please make sure that the first parameter to all methods in
44
// this interface is byte[] key. This is used in validating access. Not
45
// having byte[] key will compromise security. Please see the implementation
46
// class (AdminChannelServer) for details on how byte[] key is used.
47

48     /**
49      * Send a event notification.
50      * @param event the event
51      * @param key shared secret
52      */

53     public AdminEventResult sendNotification(byte[] key, AdminEvent event)
54             throws RemoteException JavaDoc;
55
56     /**
57      * Ping server.
58      */

59     public boolean pingServer(byte[] key) throws RemoteException JavaDoc;
60
61     /**
62      * Get server status code. This method will return one of the following
63      * constants from class <code>com.sun.enterprise.admin.common.Status</code>
64      * -- <code>kInstanceStartingCode, kInstanceRunningCode or
65      * kInstanceStoppingCode</code> representing starting, running and stopping
66      * condition for the instance.
67      * @param key shared secret
68      * @returns server status code denoting whether server is starting,
69      * running or stopping.
70      */

71     public int getServerStatusCode(byte[] key) throws RemoteException JavaDoc;
72
73     /**
74      * Is restart needed to use persistent server configuration. After a
75      * notification, the server may be in inconsistenet state with respect
76      * to persistent configuration because all changes to configuration can
77      * not be handled dynamically - A restart is needed in such cases to
78      * synchronize server with persistent configuration.
79      * @param key shared secret
80      * @return true if restart is required, false otherwise.
81      */

82     public boolean isRestartNeeded(byte[] key) throws RemoteException JavaDoc;
83
84     /**
85      * Set restart needed status on server instance.
86      * @param key shared secret
87      * @param needRestart true if the instance should be restarted to use
88      * changes in persistent configuration.
89      */

90     public void setRestartNeeded(byte[] key, boolean needRestart)
91             throws RemoteException JavaDoc;
92
93     /**
94      * Obtain the port number that caused the port conflict. This should
95      * be invoked only if Status is kInstaceFailedCode
96      * @param key shared secret
97      * @return port number.
98      */

99     public int getConflictedPort(byte[] key) throws RemoteException JavaDoc;
100
101     /**
102      * Trigger server exit now. This is applicable only for
103      * AS Socket Service based startup now.
104      * @param key shared secret
105      */

106     public void triggerServerExit(byte[] key) throws RemoteException JavaDoc ;
107
108 }
109
Popular Tags