org.objectweb.proactive.core.runtime.http
Class HttpProActiveRuntime

java.lang.Object
  extended byorg.objectweb.proactive.core.runtime.http.HttpProActiveRuntime
All Implemented Interfaces:
RemoteProActiveRuntime, java.io.Serializable

public class HttpProActiveRuntime
extends java.lang.Object
implements RemoteProActiveRuntime

An HTTP adapter for a ProActiveRuntime to be able to receive remote calls with HTTP. This helps isolate HTTP specific code into a small set of specific classes.

Since:
ProActive 2.2
Version:
1.0, 9 ao?t 2005
Author:
ProActiveTeam
See Also:
Adapter Pattern, Serialized Form

Field Summary
protected  boolean alreadykilled
           
protected  VMInformation vmInformation
           
 
Fields inherited from interface org.objectweb.proactive.core.runtime.RemoteProActiveRuntime
runtimeLogger
 
Constructor Summary
HttpProActiveRuntime()
           
HttpProActiveRuntime(java.lang.String newurl)
           
 
Method Summary
 void addAcquaintance(java.lang.String proActiveRuntimeName)
           
protected  java.lang.String buildNodeURL(java.lang.String url)
           
 UniversalBody createBody(java.lang.String nodeName, ConstructorCall bodyConstructorCall, boolean isNodeLocal)
           
 java.lang.String createLocalNode(java.lang.String nodeName, boolean replacePreviousBinding, ProActiveSecurityManager securityManager, java.lang.String vname, java.lang.String jobId)
           
 void createVM(UniversalProcess remoteProcess)
           
 java.lang.String[] getAcquaintances()
           
 java.util.ArrayList getActiveObjects(java.lang.String nodeName)
           
 java.util.ArrayList getActiveObjects(java.lang.String nodeName, java.lang.String objectName)
           
 java.security.cert.X509Certificate getCertificate()
           
 byte[] getCertificateEncoded()
           
 byte[] getClassDataFromParentRuntime(java.lang.String className)
           
 byte[] getClassDataFromThisRuntime(java.lang.String className)
           
 ProActiveDescriptor getDescriptor(java.lang.String url, boolean isHierarchicalSearch)
           
 java.util.ArrayList getEntities()
           
 java.lang.String getJobID(java.lang.String nodeUrl)
           
 java.lang.String[] getLocalNodeNames()
           
 SecurityContext getPolicy(SecurityContext securityContext)
           
 ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName)
           
 ProActiveRuntime[] getProActiveRuntimes()
           
 ExternalProcess getProcessToDeploy(ProActiveRuntime proActiveRuntimeDist, java.lang.String creatorID, java.lang.String vmName, java.lang.String padURL)
           
 java.security.PublicKey getPublicKey()
           
 java.lang.String getURL()
           
 VirtualNode getVirtualNode(java.lang.String virtualNodeName)
           
 VMInformation getVMInformation()
           
 java.lang.String getVNName(java.lang.String nodename)
           
 void killAllNodes()
           
 void killNode(java.lang.String nodeName)
           
 void killRT(boolean softly)
           
 void launchMain(java.lang.String className, java.lang.String[] parameters)
           
 void newRemote(java.lang.String className)
           
 byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey, byte[] myCertificate, byte[] signature)
           
 byte[] randomValue(long sessionID, byte[] clientRandomValue)
           
 UniversalBody receiveBody(java.lang.String nodeName, Body body)
           
 UniversalBody receiveCheckpoint(java.lang.String nodeURL, Checkpoint ckpt, int inc)
           
 void register(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeName, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
           
 void registerVirtualNode(java.lang.String virtualNodeName, boolean replacePreviousBinding)
           
 void rmAcquaintance(java.lang.String proActiveRuntimeName)
           
 byte[][] secretKeyExchange(long sessionID, byte[] encodedAESKey, byte[] encodedIVParameters, byte[] encodedClientMacKey, byte[] encodedLockData, byte[] parametersSignature)
           
 long startNewSession(Communication policy)
           
 void terminateSession(long sessionID)
           
 void unregister(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeUrl, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
           
 void unregisterAllVirtualNodes()
           
 void unregisterVirtualNode(java.lang.String virtualNodeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vmInformation

protected VMInformation vmInformation

alreadykilled

protected boolean alreadykilled
Constructor Detail

HttpProActiveRuntime

public HttpProActiveRuntime()

HttpProActiveRuntime

public HttpProActiveRuntime(java.lang.String newurl)
Method Detail

getProcessToDeploy

public ExternalProcess getProcessToDeploy(ProActiveRuntime proActiveRuntimeDist,
                                          java.lang.String creatorID,
                                          java.lang.String vmName,
                                          java.lang.String padURL)
                                   throws ProActiveException
Specified by:
getProcessToDeploy in interface RemoteProActiveRuntime
Throws:
ProActiveException

createLocalNode

public java.lang.String createLocalNode(java.lang.String nodeName,
                                        boolean replacePreviousBinding,
                                        ProActiveSecurityManager securityManager,
                                        java.lang.String vname,
                                        java.lang.String jobId)
                                 throws NodeException,
                                        HTTPRemoteException
Specified by:
createLocalNode in interface RemoteProActiveRuntime
Throws:
NodeException
HTTPRemoteException

killAllNodes

public void killAllNodes()
                  throws HTTPRemoteException,
                         ProActiveException
Specified by:
killAllNodes in interface RemoteProActiveRuntime
Throws:
HTTPRemoteException
ProActiveException

killNode

public void killNode(java.lang.String nodeName)
              throws ProActiveException,
                     HTTPRemoteException
Specified by:
killNode in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

createVM

public void createVM(UniversalProcess remoteProcess)
              throws java.io.IOException,
                     ProActiveException
Specified by:
createVM in interface RemoteProActiveRuntime
Throws:
java.io.IOException
ProActiveException

getLocalNodeNames

public java.lang.String[] getLocalNodeNames()
                                     throws ProActiveException,
                                            HTTPRemoteException
Specified by:
getLocalNodeNames in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getVMInformation

public VMInformation getVMInformation()
                               throws HTTPRemoteException
Specified by:
getVMInformation in interface RemoteProActiveRuntime
Throws:
HTTPRemoteException

register

public void register(ProActiveRuntime proActiveRuntimeDist,
                     java.lang.String proActiveRuntimeName,
                     java.lang.String creatorID,
                     java.lang.String creationProtocol,
                     java.lang.String vmName)
              throws ProActiveException,
                     HTTPRemoteException
Specified by:
register in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

unregister

public void unregister(ProActiveRuntime proActiveRuntimeDist,
                       java.lang.String proActiveRuntimeUrl,
                       java.lang.String creatorID,
                       java.lang.String creationProtocol,
                       java.lang.String vmName)
                throws ProActiveException,
                       HTTPRemoteException
Specified by:
unregister in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException
See Also:
ProActiveRuntime.unregister(org.objectweb.proactive.core.runtime.ProActiveRuntime, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

getProActiveRuntimes

public ProActiveRuntime[] getProActiveRuntimes()
                                        throws ProActiveException,
                                               HTTPRemoteException
Specified by:
getProActiveRuntimes in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getProActiveRuntime

public ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName)
                                     throws ProActiveException,
                                            HTTPRemoteException
Specified by:
getProActiveRuntime in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

killRT

public void killRT(boolean softly)
            throws java.lang.Exception
Specified by:
killRT in interface RemoteProActiveRuntime
Throws:
java.lang.Exception

getURL

public java.lang.String getURL()
                        throws ProActiveException
Specified by:
getURL in interface RemoteProActiveRuntime
Throws:
ProActiveException

getActiveObjects

public java.util.ArrayList getActiveObjects(java.lang.String nodeName)
                                     throws ProActiveException,
                                            HTTPRemoteException
Specified by:
getActiveObjects in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getActiveObjects

public java.util.ArrayList getActiveObjects(java.lang.String nodeName,
                                            java.lang.String objectName)
                                     throws ProActiveException,
                                            HTTPRemoteException
Specified by:
getActiveObjects in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getVirtualNode

public VirtualNode getVirtualNode(java.lang.String virtualNodeName)
                           throws ProActiveException,
                                  HTTPRemoteException
Specified by:
getVirtualNode in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

registerVirtualNode

public void registerVirtualNode(java.lang.String virtualNodeName,
                                boolean replacePreviousBinding)
                         throws ProActiveException,
                                HTTPRemoteException
Specified by:
registerVirtualNode in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

unregisterVirtualNode

public void unregisterVirtualNode(java.lang.String virtualNodeName)
                           throws ProActiveException,
                                  HTTPRemoteException
Specified by:
unregisterVirtualNode in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

unregisterAllVirtualNodes

public void unregisterAllVirtualNodes()
                               throws ProActiveException
Specified by:
unregisterAllVirtualNodes in interface RemoteProActiveRuntime
Throws:
ProActiveException

createBody

public UniversalBody createBody(java.lang.String nodeName,
                                ConstructorCall bodyConstructorCall,
                                boolean isNodeLocal)
                         throws ProActiveException,
                                ConstructorCallExecutionFailedException,
                                java.lang.reflect.InvocationTargetException,
                                HTTPRemoteException
Specified by:
createBody in interface RemoteProActiveRuntime
Throws:
ProActiveException
ConstructorCallExecutionFailedException
java.lang.reflect.InvocationTargetException
HTTPRemoteException

receiveBody

public UniversalBody receiveBody(java.lang.String nodeName,
                                 Body body)
                          throws ProActiveException,
                                 HTTPRemoteException
Specified by:
receiveBody in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getJobID

public java.lang.String getJobID(java.lang.String nodeUrl)
                          throws ProActiveException,
                                 HTTPRemoteException
Specified by:
getJobID in interface RemoteProActiveRuntime
Throws:
HTTPRemoteException
ProActiveException
See Also:
ProActiveRuntime.getJobID(java.lang.String)

addAcquaintance

public void addAcquaintance(java.lang.String proActiveRuntimeName)
                     throws ProActiveException,
                            HTTPRemoteException
Specified by:
addAcquaintance in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getAcquaintances

public java.lang.String[] getAcquaintances()
                                    throws ProActiveException,
                                           HTTPRemoteException
Specified by:
getAcquaintances in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

rmAcquaintance

public void rmAcquaintance(java.lang.String proActiveRuntimeName)
                    throws ProActiveException,
                           HTTPRemoteException
Specified by:
rmAcquaintance in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException
See Also:
ProActiveRuntime.rmAcquaintance(java.lang.String)

getClassDataFromParentRuntime

public byte[] getClassDataFromParentRuntime(java.lang.String className)
                                     throws ProActiveException,
                                            HTTPRemoteException
Specified by:
getClassDataFromParentRuntime in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException
See Also:
ProActiveRuntime.getClassDataFromParentRuntime(String)

getClassDataFromThisRuntime

public byte[] getClassDataFromThisRuntime(java.lang.String className)
                                   throws ProActiveException,
                                          HTTPRemoteException
Specified by:
getClassDataFromThisRuntime in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException
See Also:
ProActiveRuntime.getClassDataFromThisRuntime(String)

receiveCheckpoint

public UniversalBody receiveCheckpoint(java.lang.String nodeURL,
                                       Checkpoint ckpt,
                                       int inc)
                                throws ProActiveException,
                                       HTTPRemoteException
Specified by:
receiveCheckpoint in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getDescriptor

public ProActiveDescriptor getDescriptor(java.lang.String url,
                                         boolean isHierarchicalSearch)
                                  throws java.io.IOException,
                                         ProActiveException
Specified by:
getDescriptor in interface RemoteProActiveRuntime
Throws:
java.io.IOException
ProActiveException

launchMain

public void launchMain(java.lang.String className,
                       java.lang.String[] parameters)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException,
                       java.lang.NoSuchMethodException,
                       ProActiveException
Specified by:
launchMain in interface RemoteProActiveRuntime
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
ProActiveException

newRemote

public void newRemote(java.lang.String className)
               throws java.io.IOException,
                      java.lang.ClassNotFoundException,
                      ProActiveException
Specified by:
newRemote in interface RemoteProActiveRuntime
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ProActiveException

buildNodeURL

protected java.lang.String buildNodeURL(java.lang.String url)
                                 throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

getVNName

public java.lang.String getVNName(java.lang.String nodename)
                           throws ProActiveException,
                                  HTTPRemoteException
Specified by:
getVNName in interface RemoteProActiveRuntime
Throws:
ProActiveException
HTTPRemoteException

getCertificate

public java.security.cert.X509Certificate getCertificate()
                                                  throws SecurityNotAvailableException,
                                                         java.io.IOException
Specified by:
getCertificate in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
java.io.IOException

startNewSession

public long startNewSession(Communication policy)
                     throws SecurityNotAvailableException,
                            RenegotiateSessionException,
                            java.io.IOException
Specified by:
startNewSession in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
RenegotiateSessionException
java.io.IOException

getPublicKey

public java.security.PublicKey getPublicKey()
                                     throws SecurityNotAvailableException,
                                            java.io.IOException
Specified by:
getPublicKey in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
java.io.IOException

randomValue

public byte[] randomValue(long sessionID,
                          byte[] clientRandomValue)
                   throws SecurityNotAvailableException,
                          RenegotiateSessionException,
                          java.io.IOException
Specified by:
randomValue in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
RenegotiateSessionException
java.io.IOException

publicKeyExchange

public byte[][] publicKeyExchange(long sessionID,
                                  byte[] myPublicKey,
                                  byte[] myCertificate,
                                  byte[] signature)
                           throws SecurityNotAvailableException,
                                  RenegotiateSessionException,
                                  KeyExchangeException,
                                  java.io.IOException
Specified by:
publicKeyExchange in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
RenegotiateSessionException
KeyExchangeException
java.io.IOException

secretKeyExchange

public byte[][] secretKeyExchange(long sessionID,
                                  byte[] encodedAESKey,
                                  byte[] encodedIVParameters,
                                  byte[] encodedClientMacKey,
                                  byte[] encodedLockData,
                                  byte[] parametersSignature)
                           throws SecurityNotAvailableException,
                                  RenegotiateSessionException,
                                  java.io.IOException
Specified by:
secretKeyExchange in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
RenegotiateSessionException
java.io.IOException

getPolicy

public SecurityContext getPolicy(SecurityContext securityContext)
                          throws SecurityNotAvailableException,
                                 java.io.IOException
Specified by:
getPolicy in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
java.io.IOException

getCertificateEncoded

public byte[] getCertificateEncoded()
                             throws SecurityNotAvailableException,
                                    java.io.IOException
Specified by:
getCertificateEncoded in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
java.io.IOException

getEntities

public java.util.ArrayList getEntities()
                                throws SecurityNotAvailableException,
                                       java.io.IOException
Specified by:
getEntities in interface RemoteProActiveRuntime
Throws:
SecurityNotAvailableException
java.io.IOException

terminateSession

public void terminateSession(long sessionID)
                      throws java.io.IOException,
                             SecurityNotAvailableException
Specified by:
terminateSession in interface RemoteProActiveRuntime
Throws:
java.io.IOException
SecurityNotAvailableException


Copyright 2001-2005 INRIA All Rights Reserved.