KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > core > runtime > rmi > RemoteProActiveRuntime


1 /*
2  * ################################################################
3  *
4  * ProActive: The Java(TM) library for Parallel, Distributed,
5  * Concurrent computing with Security and Mobility
6  *
7  * Copyright (C) 1997-2002 INRIA/University of Nice-Sophia Antipolis
8  * Contact: proactive-support@inria.fr
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23  * USA
24  *
25  * Initial developer(s): The ProActive Team
26  * http://www.inria.fr/oasis/ProActive/contacts.html
27  * Contributor(s):
28  *
29  * ################################################################
30  */

31 package org.objectweb.proactive.core.runtime.rmi;
32
33 import java.rmi.RemoteException JavaDoc;
34 import java.security.cert.X509Certificate JavaDoc;
35 import java.util.ArrayList JavaDoc;
36
37 import org.apache.log4j.Logger;
38 import org.objectweb.proactive.Body;
39 import org.objectweb.proactive.core.body.UniversalBody;
40 import org.objectweb.proactive.core.descriptor.data.VirtualNode;
41 import org.objectweb.proactive.core.mop.ConstructorCall;
42 import org.objectweb.proactive.core.mop.ConstructorCallExecutionFailedException;
43 import org.objectweb.proactive.core.node.NodeException;
44 import org.objectweb.proactive.core.process.UniversalProcess;
45 import org.objectweb.proactive.core.runtime.ProActiveRuntime;
46 import org.objectweb.proactive.core.runtime.VMInformation;
47 import org.objectweb.proactive.ext.security.PolicyServer;
48 import org.objectweb.proactive.ext.security.ProActiveSecurityManager;
49
50
51 /**
52  * An adapter for a ProActiveRuntime to be able to receive remote calls. This helps isolate RMI-specific
53  * code into a small set of specific classes, thus enabling reuse if we one day decide to switch
54  * to anothe remote objects library.
55  * @see <a HREF="http://www.javaworld.com/javaworld/jw-05-1999/jw-05-networked_p.html">Adapter Pattern</a>
56  */

57 public interface RemoteProActiveRuntime extends java.rmi.Remote JavaDoc {
58     static Logger logger = Logger.getLogger(RemoteProActiveRuntime.class.getName());
59
60     public String JavaDoc createLocalNode(String JavaDoc nodeName,
61         boolean replacePreviousBinding, PolicyServer ps, String JavaDoc VNname, String JavaDoc jobId)
62         throws java.rmi.RemoteException JavaDoc, NodeException;
63
64     public void killAllNodes() throws java.rmi.RemoteException JavaDoc;
65
66     public void killNode(String JavaDoc nodeName) throws java.rmi.RemoteException JavaDoc;
67
68     //public void createLocalVM(JVMProcess jvmProcess) throws java.rmi.RemoteException,java.io.IOException;
69
public void createVM(UniversalProcess remoteProcess)
70         throws java.rmi.RemoteException JavaDoc, java.io.IOException JavaDoc;
71
72     //public Node[] getLocalNodes() throws java.rmi.RemoteException;
73
public String JavaDoc[] getLocalNodeNames() throws java.rmi.RemoteException JavaDoc;
74
75     //public String getLocalNode(String nodeName) throws java.rmi.RemoteException;
76
//public String getNode(String nodeName) throws java.rmi.RemoteException;
77
public VMInformation getVMInformation() throws java.rmi.RemoteException JavaDoc;
78
79     public void register(ProActiveRuntime proActiveRuntimeDist,
80         String JavaDoc proActiveRuntimeName, String JavaDoc creatorID, String JavaDoc creationProtocol,String JavaDoc vmName)
81         throws java.rmi.RemoteException JavaDoc;
82
83     public ProActiveRuntime[] getProActiveRuntimes()
84         throws java.rmi.RemoteException JavaDoc;
85
86     public ProActiveRuntime getProActiveRuntime(String JavaDoc proActiveRuntimeName)
87         throws java.rmi.RemoteException JavaDoc;
88
89     public void killRT(boolean softly) throws java.rmi.RemoteException JavaDoc;
90
91     public String JavaDoc getURL() throws java.rmi.RemoteException JavaDoc;
92
93     public ArrayList JavaDoc getActiveObjects(String JavaDoc nodeName)
94         throws java.rmi.RemoteException JavaDoc;
95
96     public ArrayList JavaDoc getActiveObjects(String JavaDoc nodeName, String JavaDoc objectName)
97         throws java.rmi.RemoteException JavaDoc;
98
99     public VirtualNode getVirtualNode(String JavaDoc virtualNodeName)
100         throws java.rmi.RemoteException JavaDoc;
101
102     public void registerVirtualNode(String JavaDoc virtualNodeName,
103         boolean replacePreviousBinding) throws java.rmi.RemoteException JavaDoc;
104
105     public void unregisterVirtualNode(String JavaDoc virtualNodeName)
106         throws java.rmi.RemoteException JavaDoc;
107
108     public void unregisterAllVirtualNodes() throws java.rmi.RemoteException JavaDoc;
109
110     public String JavaDoc getJobID(String JavaDoc nodeUrl) throws java.rmi.RemoteException JavaDoc;
111     
112     public UniversalBody createBody(String JavaDoc nodeName,
113         ConstructorCall bodyConstructorCall, boolean isNodeLocal)
114         throws java.rmi.RemoteException JavaDoc,
115             ConstructorCallExecutionFailedException,
116             java.lang.reflect.InvocationTargetException JavaDoc;
117
118     public UniversalBody receiveBody(String JavaDoc nodeName, Body body)
119         throws java.rmi.RemoteException JavaDoc;
120     /**
121      * @return creator certificate
122      */

123     public X509Certificate JavaDoc getCreatorCertificate()
124         throws java.rmi.RemoteException JavaDoc;
125
126     public PolicyServer getPolicyServer() throws java.rmi.RemoteException JavaDoc;
127
128     public void setProActiveSecurityManager(ProActiveSecurityManager ps)
129         throws java.rmi.RemoteException JavaDoc;
130
131     public String JavaDoc getVNName(String JavaDoc Nodename) throws java.rmi.RemoteException JavaDoc;
132
133     /**
134      * @param s
135      */

136     public void setDefaultNodeVirtualNodeNAme(String JavaDoc s)
137         throws java.rmi.RemoteException JavaDoc;
138
139     public void updateLocalNodeVirtualName() throws RemoteException JavaDoc;
140     public PolicyServer getNodePolicyServer(String JavaDoc nodeName)throws RemoteException JavaDoc;
141
142
143      /**
144       * sets all needed modifications to enable security components
145       * MUST be called when the descriptor is ready
146       */

147      public void enableSecurityIfNeeded()throws RemoteException JavaDoc;
148      
149     public X509Certificate JavaDoc getNodeCertificate(String JavaDoc nodeName) throws RemoteException JavaDoc;
150     
151     /**
152      * @param nodeName
153      * @return returns all entities associated to the node
154      */

155     public ArrayList JavaDoc getEntities(String JavaDoc nodeName)throws RemoteException JavaDoc;
156
157     /**
158      * @param nodeName
159      * @return returns all entities associated to the node
160      */

161     public ArrayList JavaDoc getEntities(UniversalBody uBody)throws RemoteException JavaDoc;
162
163
164
165     /**
166      * @return returns all entities associated to this runtime
167      */

168     public ArrayList JavaDoc getEntities() throws RemoteException JavaDoc;
169
170  
171
172 }
173
Popular Tags