KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > adm > AdmInterface


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): ____________________________________.
22  * Contributor(s): ______________________________________.
23  * JOnAS 2.4 Murad Meghani (Murad.Meghani@compuware.com) killServer and stopServer
24  * JOnAS 2.5 2002.06 Florent Benoit & Ludovic Bert :
25  * Methods for wars and ear files
26  * Dean Jennings = add deployFile
27  * --------------------------------------------------------------------------
28  * $Id: AdmInterface.java,v 1.23 2005/07/13 06:28:35 durieuxp Exp $
29  * --------------------------------------------------------------------------
30  */

31
32 package org.objectweb.jonas.adm;
33
34 import java.rmi.Remote JavaDoc;
35 import java.rmi.RemoteException JavaDoc;
36 import java.util.Properties JavaDoc;
37 import java.util.Vector JavaDoc;
38 import java.util.List JavaDoc;
39
40 import org.objectweb.jonas.ear.EarServiceException;
41 import org.objectweb.jonas.resource.ResourceServiceException;
42 import org.objectweb.jonas.web.JWebContainerServiceException;
43
44 /*
45  * JOnAS Administration Remote Interface.
46  * This is used basically by jonas admin.
47  * @author Philippe Coq
48  * Contributor(s):
49  * Murad Meghani (Murad.Meghani@compuware.com) killServer and stopServer
50  * Florent Benoit & Ludovic Bert : Methods for wars and ear files
51  */

52 public interface AdmInterface extends Remote JavaDoc {
53
54     public static final int TYPE_EJB = 1;
55     public static final int TYPE_WAR = 2;
56     public static final int TYPE_EAR = 3;
57     public static final int TYPE_RAR = 4;
58     public static final int TYPE_CAR = 5;
59
60     public static final int STATUS_RUNNING = 1;
61     public static final int STATUS_STOPPED = 2;
62     public static final int STATUS_ALL = 0;
63
64     /**
65      * Deploy a given ear file with the help of the ear service.
66      * @param fileName the name of the ear file.
67      * @throws RemoteException if rmi call failed.
68      * @throws EarServiceException if the deployment failed.
69      */

70     public void addEar(String JavaDoc fileName) throws RemoteException JavaDoc, EarServiceException;
71
72     /**
73      * Deploy a given rar file with the help of the resource service.
74      * @param fileName the name of the rar file.
75      * @throws RemoteException if rmi call failed.
76      * @throws ResourceServiceException if the deployment failed.
77      */

78     public void addRar(String JavaDoc fileName) throws RemoteException JavaDoc, ResourceServiceException;
79
80     /**
81      * Deploy a given war file with the help of the web container service.
82      * @param fileName the name of the war file.
83      * @throws RemoteException if rmi call failed.
84      * @throws JWebContainerServiceException if the deployment failed.
85      */

86     public void addWar(String JavaDoc fileName) throws RemoteException JavaDoc, JWebContainerServiceException;
87
88     /**
89      * UnDeploy a given ear file with the help of the ear service.
90      * @param fileName the name of the ear file.
91      * @throws RemoteException if rmi call failed.
92      * @throws EarServiceException if the undeployment failed.
93      */

94     public void removeEar(String JavaDoc fileName) throws RemoteException JavaDoc, EarServiceException;
95
96     /**
97      * UnDeploy a given rar file with the help of the resource service.
98      * @param fileName the name of the rar file.
99      * @throws RemoteException if rmi call failed.
100      * @throws ResourceServiceException if the undeployment failed.
101      */

102     public void removeRar(String JavaDoc fileName) throws RemoteException JavaDoc, ResourceServiceException;
103
104     /**
105      * UnDeploy a given war file with the help of the web container service.
106      * @param fileName the name of the war file.
107      * @throws RemoteException if rmi call failed.
108      * @throws JWebContainerServiceException if the undeployment failed.
109      */

110     public void removeWar(String JavaDoc fileName) throws RemoteException JavaDoc, JWebContainerServiceException;
111
112     /**
113      * Test if the specified filename is already deployed or not
114      * @param fileName the name of the ear file.
115      * @return true if the ear is deployed, else false.
116      * @throws RemoteException if rmi call failed.
117      */

118     boolean isEarLoaded(String JavaDoc fileName) throws RemoteException JavaDoc, EarServiceException;
119
120     /**
121      * Test if the specified filename is already deployed or not
122      * @param fileName the name of the rar file.
123      * @return true if the rar is deployed, else false.
124      * @throws RemoteException if rmi call failed.
125      */

126     boolean isRarLoaded(String JavaDoc fileName) throws RemoteException JavaDoc, ResourceServiceException;
127
128
129     /**
130      * Test if the specified filename is already deployed or not
131      * @param fileName the name of the war file.
132      * @return true if the war is deployed, else false.
133      * @throws RemoteException if rmi call failed.
134      */

135     boolean isWarLoaded(String JavaDoc fileName) throws RemoteException JavaDoc, JWebContainerServiceException;
136
137
138     void addBeans(String JavaDoc fileName) throws RemoteException JavaDoc;
139     void removeBeans(String JavaDoc fileName) throws RemoteException JavaDoc;
140     boolean isLoaded(String JavaDoc fileName) throws RemoteException JavaDoc;
141     String JavaDoc [] listBeans() throws RemoteException JavaDoc;
142     String JavaDoc dumpCustom() throws RemoteException JavaDoc;
143     Vector JavaDoc listContext() throws RemoteException JavaDoc;
144     Properties JavaDoc listEnv() throws RemoteException JavaDoc;
145     void stopServer() throws RemoteException JavaDoc;
146     void killServer() throws RemoteException JavaDoc;
147     boolean isEJBContainer() throws RemoteException JavaDoc;
148     int getServerState() throws RemoteException JavaDoc;
149     void setTransactionTimeout(int timeout) throws RemoteException JavaDoc;
150     void runGC() throws RemoteException JavaDoc;
151     void syncAllEntities(boolean passivate) throws RemoteException JavaDoc;
152     String JavaDoc [] getTopics() throws RemoteException JavaDoc;
153     String JavaDoc getTopicLevel(String JavaDoc topic) throws RemoteException JavaDoc;
154     void setTopicLevel(String JavaDoc topic, String JavaDoc l) throws RemoteException JavaDoc;
155     /**
156      * Deploy file (GenIC), needed for Ishmael to work.
157      * @param type type of the file (EJB, WAR, EAR, RAR, CAR)
158      * @param file the actual file
159      * @param filename basename of the file to be deployed
160      * @throws RemoteException
161      * @throws EarServiceException
162      * @throws ResourceServiceException
163      * @throws JWebContainerServiceException
164      * @author Dean Jennings. <deanjennings@junta.com.au>
165      */

166     String JavaDoc deployFile(int type, byte[] file, String JavaDoc filename)
167                throws RemoteException JavaDoc , EarServiceException, ResourceServiceException, JWebContainerServiceException;
168
169
170     /**
171      * List modules, needed for Ishmael to work. Currently only lists top
172      * level modules. It does need to do sub elements of ears in the future.
173      * @param type type of the file (EJB, WAR, EAR, RAR, CAR)
174      * @param state status of the modules to be returned
175      * (RUNNING, STOPPED, ALL)
176      * @throws RemoteException
177      * @author Dean Jennings. <deanjennings@junta.com.au>
178      */

179     List JavaDoc listModules(int type, int state) throws RemoteException JavaDoc;
180
181     /**
182      * Physically remove the module from the server
183      * @param filename the filename of the module to be removed
184      * @throws RemoteException
185      * @author Dean Jennings. <deanjennings@junta.com.au>
186      *
187      */

188     public void undeployFile(String JavaDoc filename) throws RemoteException JavaDoc;
189 }
190
Popular Tags