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.rmi.AlreadyBoundException;
00035 import java.security.PublicKey;
00036 import java.security.cert.X509Certificate;
00037 import java.util.ArrayList;
00038
00039 import org.apache.log4j.Logger;
00040 import org.objectweb.proactive.Body;
00041 import org.objectweb.proactive.core.ProActiveException;
00042 import org.objectweb.proactive.core.UniqueRuntimeID;
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
00083 public interface ProActiveRuntimeForwarder extends ProActiveRuntime {
00084 static Logger runtimeLogger = ProActiveLogger.getLogger(Loggers.RUNTIME);
00085
00089 public String createLocalNode(UniqueRuntimeID urid, String nodeName,
00090 boolean replacePreviousBinding, ProActiveSecurityManager psm,
00091 String vnName, String jobId)
00092 throws NodeException, AlreadyBoundException;
00093
00097 public void killAllNodes(UniqueRuntimeID urid) throws ProActiveException;
00098
00102 public void killNode(UniqueRuntimeID urid, String nodeName)
00103 throws ProActiveException;
00104
00108 public void createVM(UniqueRuntimeID urid, UniversalProcess remoteProcess)
00109 throws java.io.IOException, ProActiveException;
00110
00114 public String[] getLocalNodeNames(UniqueRuntimeID urid)
00115 throws ProActiveException;
00116
00120 public VMInformation getVMInformation(UniqueRuntimeID urid);
00121
00125 public void register(UniqueRuntimeID urid,
00126 ProActiveRuntime proActiveRuntimeDist, String proActiveRuntimeUrl,
00127 String creatorID, String creationProtocol, String vmName)
00128 throws ProActiveException;
00129
00133 public void unregister(UniqueRuntimeID urid,
00134 ProActiveRuntime proActiveRuntimeDist, String proActiveRuntimeUrl,
00135 String creatorID, String creationProtocol, String vmName)
00136 throws ProActiveException;
00137
00141 public ProActiveRuntime[] getProActiveRuntimes(UniqueRuntimeID urid)
00142 throws ProActiveException;
00143
00147 public ProActiveRuntime getProActiveRuntime(UniqueRuntimeID urid,
00148 String proActiveRuntimeName) throws ProActiveException;
00149
00153 void addAcquaintance(UniqueRuntimeID urid, String proActiveRuntimeName)
00154 throws ProActiveException;
00155
00159 public String[] getAcquaintances(UniqueRuntimeID urid)
00160 throws ProActiveException;
00161
00165 public void rmAcquaintance(UniqueRuntimeID urid, String proActiveRuntimeName)
00166 throws ProActiveException;
00167
00171 public void killRT(UniqueRuntimeID urid, boolean softly)
00172 throws Exception;
00173
00177 public String getURL(UniqueRuntimeID urid);
00178
00182 public ArrayList getActiveObjects(UniqueRuntimeID urid, String nodeName)
00183 throws ProActiveException;
00184
00188 public ArrayList getActiveObjects(UniqueRuntimeID urid, String nodeName,
00189 String className) throws ProActiveException;
00190
00194 public VirtualNode getVirtualNode(UniqueRuntimeID urid,
00195 String virtualNodeName) throws ProActiveException;
00196
00200 public void registerVirtualNode(UniqueRuntimeID urid,
00201 String virtualNodeName, boolean replacePreviousBinding)
00202 throws ProActiveException, AlreadyBoundException;
00203
00207 public void unregisterVirtualNode(UniqueRuntimeID urid,
00208 String virtualNodeName) throws ProActiveException;
00209
00213 public void unregisterAllVirtualNodes(UniqueRuntimeID urid)
00214 throws ProActiveException;
00215
00219 public String getJobID(UniqueRuntimeID urid, String nodeUrl)
00220 throws ProActiveException;
00221
00225 public UniversalBody createBody(UniqueRuntimeID urid, String nodeName,
00226 ConstructorCall bodyConstructorCall, boolean isNodeLocal)
00227 throws ProActiveException, ConstructorCallExecutionFailedException,
00228 java.lang.reflect.InvocationTargetException;
00229
00233 public UniversalBody receiveBody(UniqueRuntimeID urid, String nodeName,
00234 Body body) throws ProActiveException;
00235
00239 public UniversalBody receiveCheckpoint(UniqueRuntimeID urid,
00240 String nodeName, Checkpoint ckpt, int inc) throws ProActiveException;
00241
00245 public ExternalProcess getProcessToDeploy(UniqueRuntimeID urid,
00246 ProActiveRuntime proActiveRuntimeDist, String creatorID, String vmName,
00247 String padURL) throws ProActiveException;
00248
00252 public byte[] getClassDataFromThisRuntime(UniqueRuntimeID urid,
00253 String className) throws ProActiveException;
00254
00258 public byte[] getClassDataFromParentRuntime(UniqueRuntimeID urid,
00259 String className) throws ProActiveException;
00260
00264 public void launchMain(UniqueRuntimeID urid, String className,
00265 String[] parameters)
00266 throws ClassNotFoundException, NoSuchMethodException, ProActiveException;
00267
00271 public void newRemote(UniqueRuntimeID urid, String className)
00272 throws ClassNotFoundException, ProActiveException;
00273
00274
00275
00276
00277 public X509Certificate getCertificate(UniqueRuntimeID urid)
00278 throws SecurityNotAvailableException, IOException;
00279
00280 public long startNewSession(UniqueRuntimeID urid, Communication policy)
00281 throws SecurityNotAvailableException, RenegotiateSessionException,
00282 IOException;
00283
00284 public PublicKey getPublicKey(UniqueRuntimeID urid)
00285 throws SecurityNotAvailableException, IOException;
00286
00287 public byte[] randomValue(UniqueRuntimeID urid, long sessionID,
00288 byte[] clientRandomValue)
00289 throws SecurityNotAvailableException, RenegotiateSessionException,
00290 IOException;
00291
00292 public byte[][] publicKeyExchange(UniqueRuntimeID urid, long sessionID,
00293 byte[] myPublicKey, byte[] myCertificate, byte[] signature)
00294 throws SecurityNotAvailableException, RenegotiateSessionException,
00295 KeyExchangeException, IOException;
00296
00297 public byte[][] secretKeyExchange(UniqueRuntimeID urid, long sessionID,
00298 byte[] encodedAESKey, byte[] encodedIVParameters,
00299 byte[] encodedClientMacKey, byte[] encodedLockData,
00300 byte[] parametersSignature)
00301 throws SecurityNotAvailableException, RenegotiateSessionException,
00302 IOException;
00303
00304 public SecurityContext getPolicy(UniqueRuntimeID urid,
00305 SecurityContext securityContext)
00306 throws SecurityNotAvailableException, IOException;
00307
00308 public byte[] getCertificateEncoded(UniqueRuntimeID urid)
00309 throws SecurityNotAvailableException, IOException;
00310
00311 public ArrayList<Entity> getEntities(UniqueRuntimeID urid)
00312 throws SecurityNotAvailableException, IOException;
00313
00314 public void terminateSession(UniqueRuntimeID urid, long sessionID)
00315 throws SecurityNotAvailableException, IOException;
00316
00317 public String getVNName(UniqueRuntimeID urid, String Nodename)
00318 throws ProActiveException;
00319
00320 public ProActiveDescriptor getDescriptor(UniqueRuntimeID urid, String url,
00321 boolean isHierarchicalSearch) throws IOException, ProActiveException;
00322
00323
00324 public String getJobID(UniqueRuntimeID urid);
00325
00326 public Object setLocalNodeProperty(UniqueRuntimeID runtimeID,
00327 String nodeName, String key, String value)
00328 throws IOException, ProActiveException;
00329
00330 public String getLocalNodeProperty(UniqueRuntimeID runtimeID,
00331 String nodeName, String key) throws IOException, ProActiveException;
00332 }