00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 package org.objectweb.proactive.core.runtime;
00032
00033 import java.io.IOException;
00034 import java.io.Serializable;
00035 import java.rmi.AlreadyBoundException;
00036 import java.security.PublicKey;
00037 import java.security.cert.X509Certificate;
00038 import java.util.ArrayList;
00039
00040 import org.apache.log4j.Logger;
00041 import org.objectweb.proactive.Body;
00042 import org.objectweb.proactive.core.ProActiveException;
00043 import org.objectweb.proactive.core.body.UniversalBody;
00044 import org.objectweb.proactive.core.body.ft.checkpointing.Checkpoint;
00045 import org.objectweb.proactive.core.descriptor.data.ProActiveDescriptor;
00046 import org.objectweb.proactive.core.descriptor.data.VirtualNode;
00047 import org.objectweb.proactive.core.mop.ConstructorCall;
00048 import org.objectweb.proactive.core.mop.ConstructorCallExecutionFailedException;
00049 import org.objectweb.proactive.core.node.NodeException;
00050 import org.objectweb.proactive.core.process.ExternalProcess;
00051 import org.objectweb.proactive.core.process.UniversalProcess;
00052 import org.objectweb.proactive.core.util.log.Loggers;
00053 import org.objectweb.proactive.core.util.log.ProActiveLogger;
00054 import org.objectweb.proactive.ext.security.Communication;
00055 import org.objectweb.proactive.ext.security.ProActiveSecurityManager;
00056 import org.objectweb.proactive.ext.security.SecurityContext;
00057 import org.objectweb.proactive.ext.security.crypto.KeyExchangeException;
00058 import org.objectweb.proactive.ext.security.exceptions.RenegotiateSessionException;
00059 import org.objectweb.proactive.ext.security.exceptions.SecurityNotAvailableException;
00060 import org.objectweb.proactive.ext.security.securityentity.Entity;
00061
00062
00073 public interface RemoteProActiveRuntime extends Serializable {
00074 static Logger runtimeLogger = ProActiveLogger.getLogger(Loggers.RUNTIME);
00075
00076 public String createLocalNode(String nodeName,
00077 boolean replacePreviousBinding,
00078 ProActiveSecurityManager securityManager, String VNname, String jobId)
00079 throws IOException, NodeException, AlreadyBoundException;
00080
00081 public void killAllNodes() throws IOException, ProActiveException;
00082
00083 public void killNode(String nodeName)
00084 throws IOException, ProActiveException;
00085
00086 public void createVM(UniversalProcess remoteProcess)
00087 throws java.io.IOException, ProActiveException;
00088
00089 public String[] getLocalNodeNames() throws IOException, ProActiveException;
00090
00091 public VMInformation getVMInformation() throws IOException;
00092
00093 public void register(ProActiveRuntime proActiveRuntimeDist,
00094 String proActiveRuntimeName, String creatorID, String creationProtocol,
00095 String vmName) throws IOException, ProActiveException;
00096
00097 public void unregister(ProActiveRuntime proActiveRuntimeDist,
00098 String proActiveRuntimeName, String creatorID, String creationProtocol,
00099 String vmName) throws IOException, ProActiveException;
00100
00101 public ProActiveRuntime[] getProActiveRuntimes()
00102 throws IOException, ProActiveException;
00103
00104 public ProActiveRuntime getProActiveRuntime(String proActiveRuntimeName)
00105 throws IOException, ProActiveException;
00106
00107 public void addAcquaintance(String proActiveRuntimeName)
00108 throws IOException, ProActiveException;
00109
00110 public String[] getAcquaintances() throws IOException, ProActiveException;
00111
00112 public void rmAcquaintance(String proActiveRuntimeName)
00113 throws IOException, ProActiveException;
00114
00115 public void killRT(boolean softly) throws Exception;
00116
00117 public String getURL() throws IOException, ProActiveException;
00118
00119 public ArrayList getActiveObjects(String nodeName)
00120 throws IOException, ProActiveException;
00121
00122 public ArrayList getActiveObjects(String nodeName, String objectName)
00123 throws IOException, ProActiveException;
00124
00125 public VirtualNode getVirtualNode(String virtualNodeName)
00126 throws IOException, ProActiveException;
00127
00128 public void registerVirtualNode(String virtualNodeName,
00129 boolean replacePreviousBinding)
00130 throws IOException, AlreadyBoundException, ProActiveException;
00131
00132 public void unregisterVirtualNode(String virtualNodeName)
00133 throws IOException, ProActiveException;
00134
00135 public void unregisterAllVirtualNodes()
00136 throws IOException, ProActiveException;
00137
00138 public String getJobID(String nodeUrl)
00139 throws IOException, ProActiveException;
00140
00141 public UniversalBody createBody(String nodeName,
00142 ConstructorCall bodyConstructorCall, boolean isNodeLocal)
00143 throws IOException, ConstructorCallExecutionFailedException,
00144 java.lang.reflect.InvocationTargetException, ProActiveException;
00145
00146 public UniversalBody receiveBody(String nodeName, Body body)
00147 throws IOException, ProActiveException;
00148
00149 public UniversalBody receiveCheckpoint(String nodeName, Checkpoint ckpt,
00150 int inc) throws IOException, ProActiveException;
00151
00152 public ExternalProcess getProcessToDeploy(
00153 ProActiveRuntime proActiveRuntimeDist, String creatorID, String vmName,
00154 String padURL) throws ProActiveException, IOException;
00155
00159 public byte[] getClassDataFromParentRuntime(String className)
00160 throws IOException, ProActiveException;
00161
00165 public byte[] getClassDataFromThisRuntime(String className)
00166 throws IOException, ProActiveException;
00167
00168 public String getVNName(String Nodename)
00169 throws IOException, ProActiveException;
00170
00171 public void launchMain(String className, String[] parameters)
00172 throws IOException, ClassNotFoundException, NoSuchMethodException,
00173 ProActiveException;
00174
00175 public void newRemote(String className)
00176 throws IOException, ClassNotFoundException, ProActiveException;
00177
00178 public ProActiveDescriptor getDescriptor(String url,
00179 boolean isHierarchicalSearch) throws IOException, ProActiveException;
00180
00181
00182
00183
00184 public X509Certificate getCertificate()
00185 throws SecurityNotAvailableException, java.io.IOException;
00186
00187 public long startNewSession(Communication policy)
00188 throws SecurityNotAvailableException, RenegotiateSessionException,
00189 java.io.IOException;
00190
00191 public PublicKey getPublicKey()
00192 throws SecurityNotAvailableException, java.io.IOException;
00193
00194 public byte[] randomValue(long sessionID, byte[] clientRandomValue)
00195 throws SecurityNotAvailableException, RenegotiateSessionException,
00196 java.io.IOException;
00197
00198 public byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey,
00199 byte[] myCertificate, byte[] signature)
00200 throws SecurityNotAvailableException, RenegotiateSessionException,
00201 KeyExchangeException, java.io.IOException;
00202
00203 byte[][] secretKeyExchange(long sessionID, byte[] encodedAESKey,
00204 byte[] encodedIVParameters, byte[] encodedClientMacKey,
00205 byte[] encodedLockData, byte[] parametersSignature)
00206 throws SecurityNotAvailableException, RenegotiateSessionException,
00207 java.io.IOException;
00208
00209 public SecurityContext getPolicy(SecurityContext securityContext)
00210 throws SecurityNotAvailableException, java.io.IOException;
00211
00212 public byte[] getCertificateEncoded()
00213 throws SecurityNotAvailableException, java.io.IOException;
00214
00215 public ArrayList<Entity> getEntities()
00216 throws SecurityNotAvailableException, java.io.IOException;
00217
00218 public void terminateSession(long sessionID)
00219 throws java.io.IOException, SecurityNotAvailableException;
00220
00221 public Object setLocalNodeProperty(String nodeName, String key, String value)
00222 throws IOException, ProActiveException;
00223
00224 public String getLocalNodeProperty(String nodeName, String key)
00225 throws IOException, ProActiveException;
00226 }