org.objectweb.proactive.core.runtime
Class ProActiveRuntimeImpl

java.lang.Object
  extended byorg.objectweb.proactive.core.event.AbstractEventProducer
      extended byorg.objectweb.proactive.core.event.RuntimeRegistrationEventProducerImpl
          extended byorg.objectweb.proactive.core.runtime.ProActiveRuntimeImpl
All Implemented Interfaces:
Job, LocalProActiveRuntime, ProActiveRuntime, RuntimeRegistrationEventProducer, SecurityEntity, java.io.Serializable
Direct Known Subclasses:
ProActiveRuntimeForwarderImpl

public class ProActiveRuntimeImpl
extends RuntimeRegistrationEventProducerImpl
implements ProActiveRuntime, LocalProActiveRuntime

Implementation of ProActiveRuntime

Since:
ProActive 0.91
Version:
1.0, 2001/10/23
Author:
ProActive Team
See Also:
Serialized Form

Nested Class Summary
protected static class ProActiveRuntimeImpl.VMInformationImpl
           
 
Nested classes inherited from class org.objectweb.proactive.core.event.AbstractEventProducer
AbstractEventProducer.ListenerList
 
Field Summary
 
Fields inherited from class org.objectweb.proactive.core.event.AbstractEventProducer
eventListeners, logger, shouldSerializeListeners
 
Fields inherited from interface org.objectweb.proactive.core.runtime.ProActiveRuntime
runtimeLogger
 
Constructor Summary
protected ProActiveRuntimeImpl()
           
 
Method Summary
 void addAcquaintance(java.lang.String proActiveRuntimeName)
          **For internal use only** Tells this runtime that it's registered in another one
 UniversalBody createBody(java.lang.String nodeName, ConstructorCall bodyConstructorCall, boolean isLocal)
           This method is the basis for creating remote active objects.
 java.lang.String createLocalNode(java.lang.String nodeName, boolean replacePreviousBinding, ProActiveSecurityManager nodeSecurityManager, java.lang.String vnName, java.lang.String jobId)
          Creates a new Node in the same VM as this ProActiveRuntime
 void createVM(UniversalProcess remoteProcess)
          Creates a new ProActiveRuntime associated with a new VM on the host defined in the given process.
 java.lang.String[] getAcquaintances()
          Returns all the ProActiveRuntime URL in which this runtime is registered
 java.util.ArrayList getActiveObjects(java.lang.String nodeName)
          Returns all Active Objects deployed on the node with the given name on this ProActiveRuntime
 java.util.ArrayList getActiveObjects(java.lang.String nodeName, java.lang.String className)
          Returns all Active Objects with the specified class name, deployed on the node with the given name on this ProActiveRuntime
 java.security.cert.X509Certificate getCertificate()
          entity certificate
 byte[] getCertificateEncoded()
          Entity's X509Certificate as byte array
 byte[] getClassDataFromParentRuntime(java.lang.String className)
          Looks for class bytecode in the ancestors of the current runtime : first it tries in the father runtime, then in the grand-father etc...
 byte[] getClassDataFromThisRuntime(java.lang.String className)
          Looks for class bytecode in the current runtime.
 ProActiveDescriptor getDescriptor(java.lang.String url, boolean isHierarchicalSearch)
          return the pad matching with the given url or parse it from the file system
 java.util.ArrayList getEntities()
          Retrieves all the entity's ID which contain this entity plus this entity ID.
 java.util.ArrayList getEntities(SecurityEntity securityEntity)
          the runtime looks for a matching security entity whithin its nodes and active objects
 java.util.ArrayList getEntities(java.lang.String nodeName)
           
 java.lang.String getJobID()
           
 java.lang.String getJobID(java.lang.String nodeUrl)
           
 java.lang.String[] getLocalNodeNames()
          Returns the name of all nodes known by this ProActiveRuntime on this VM
protected static int getNextInt()
           
 PolicyServer getNodePolicyServer(java.lang.String nodeName)
           
 SecurityContext getPolicy(SecurityContext sc)
          Ask the entity to fill the securityContext parameters with its own policy according to the communication details contained in the given securityContext
static ProActiveRuntime getProActiveRuntime()
           
 ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName)
          Returns the ProActiveRuntime of specified name
 ProActiveRuntime[] getProActiveRuntimes()
          Returns all the ProActiveRuntime registered on this ProActiveRuntime on this VM
 ProActiveSecurityManager getProActiveSecurityManager()
           
 ExternalProcess getProcessToDeploy(ProActiveRuntime proActiveRuntimeDist, java.lang.String creatorID, java.lang.String vmName, java.lang.String padURL)
          Ask proActiveRuntimeDist for the process with given ids: padURL, creatorID, vmName.
 java.security.PublicKey getPublicKey()
          entity public key
 java.lang.String getURL()
          Returns the url of this ProActiveRuntime on the local or remote VM
 VirtualNode getVirtualNode(java.lang.String virtualNodeName)
          Returns the VirtualNode with the given name
 VMInformation getVMInformation()
          Returns the JVM information as one object.
 java.lang.String getVNName(java.lang.String nodename)
           
 void killAllNodes()
          Kills all Nodes in this ProActiveRuntime
 void killNode(java.lang.String nodeName)
          Kills the Node of the given name and all Active Objects deployed on it.
 void killRT(boolean softly)
          Kills this ProActiveRuntime and this VM
 void launchMain(java.lang.String className, java.lang.String[] parameters)
          launch the main method of the main class with parameters
 void newRemote(java.lang.String className)
          construct a new instance remotly
 byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey, byte[] myCertificate, byte[] signature)
          exchange entity certificate and/or public key if certificate are not available
 byte[] randomValue(long sessionID, byte[] clientRandomValue)
          Exchange random value between client and server entity
 UniversalBody receiveBody(java.lang.String nodeName, Body body)
           This method is the basis for migrating active objects.
 UniversalBody receiveCheckpoint(java.lang.String nodeURL, Checkpoint ckpt, int inc)
          The runtime recovers the body contained in the checkpoint ckpt.
 void register(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeName, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
          **For internal use only** Allows this ProActiveRuntime on this VM to register another ProActiveRuntime
 void registerDescriptor(java.lang.String url, ProActiveDescriptor pad)
           
 void registerLocalVirtualNode(VirtualNode vn, java.lang.String vnName)
          Register the given VirtualNode on this local ProActiveRuntime.
 void registerVirtualNode(java.lang.String virtualNodeName, boolean replacePreviousBinding)
          Registers the virtualNode of the given name in a registry such RMIRegistry or Jini Service Lookup
 void removeDescriptor(java.lang.String url)
           
 void rmAcquaintance(java.lang.String proActiveRuntimeName)
          **For internal use only** .
 byte[][] secretKeyExchange(long sessionID, byte[] encodedAESKey, byte[] encodedIVParameters, byte[] encodedClientMacKey, byte[] encodedLockData, byte[] parametersSignature)
          this method sends encoded secret parameters to the target entity
 void setDefaultNodeVirtualNodeName(java.lang.String s)
           
 void setParent(ProActiveRuntime parentPARuntime)
          This method adds a reference to the runtime that created this runtime.
static void setProActiveSecurityManager(ProActiveSecurityManager server)
          set the runtime security manager
 long startNewSession(Communication policy)
          start an unvalidated empty session
 void terminateSession(long sessionID)
          terminate a given session
 void unregister(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeUrl, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
          **For internal use only** Allows this ProactiveRuntime on this VM to unregister an already resigesterd ProActiveRuntime.
 void unregisterAllVirtualNodes()
          Unregisters all VirtualNodes from the local runtime
 void unregisterVirtualNode(java.lang.String virtualNodeName)
          Unregisters the VirtualNode of the given name from the local runtime.
 
Methods inherited from class org.objectweb.proactive.core.event.RuntimeRegistrationEventProducerImpl
addRuntimeRegistrationEventListener, notifyListeners, notifyOneListener, removeRuntimeRegistrationEventListener
 
Methods inherited from class org.objectweb.proactive.core.event.AbstractEventProducer
addListener, hasListeners, notifyAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProActiveRuntimeImpl

protected ProActiveRuntimeImpl()
Method Detail

getNextInt

protected static int getNextInt()

getProActiveRuntime

public static ProActiveRuntime getProActiveRuntime()

registerLocalVirtualNode

public void registerLocalVirtualNode(VirtualNode vn,
                                     java.lang.String vnName)
Description copied from interface: LocalProActiveRuntime
Register the given VirtualNode on this local ProActiveRuntime.

Specified by:
registerLocalVirtualNode in interface LocalProActiveRuntime
Parameters:
vn - the virtualnode to register
vnName - the name of the VirtualNode to register
See Also:
LocalProActiveRuntime.registerLocalVirtualNode(VirtualNode vn, String vnName)

setParent

public void setParent(ProActiveRuntime parentPARuntime)
Description copied from interface: LocalProActiveRuntime
This method adds a reference to the runtime that created this runtime. It is called when a new runtime is created from another one.

Specified by:
setParent in interface LocalProActiveRuntime
Parameters:
parentPARuntime - the creator of this runtime
See Also:
LocalProActiveRuntime.setParent(ProActiveRuntime parentPARuntime)

registerDescriptor

public void registerDescriptor(java.lang.String url,
                               ProActiveDescriptor pad)

getDescriptor

public ProActiveDescriptor getDescriptor(java.lang.String url,
                                         boolean isHierarchicalSearch)
                                  throws java.io.IOException,
                                         ProActiveException
Description copied from interface: ProActiveRuntime
return the pad matching with the given url or parse it from the file system

Specified by:
getDescriptor in interface ProActiveRuntime
Parameters:
url - url of the pad
isHierarchicalSearch - if yes search for the pad hierarchically
Returns:
the pad found or a new pad parsed from xmlDescriptorUrl
Throws:
ProActiveException
java.io.IOException

removeDescriptor

public void removeDescriptor(java.lang.String url)

createLocalNode

public java.lang.String createLocalNode(java.lang.String nodeName,
                                        boolean replacePreviousBinding,
                                        ProActiveSecurityManager nodeSecurityManager,
                                        java.lang.String vnName,
                                        java.lang.String jobId)
                                 throws NodeException
Description copied from interface: ProActiveRuntime
Creates a new Node in the same VM as this ProActiveRuntime

Specified by:
createLocalNode in interface ProActiveRuntime
Parameters:
nodeName - the name of the node to create localy
replacePreviousBinding -
Returns:
the url of the newly created node in the target VM
Throws:
NodeException - if the new node cannot be created
See Also:
ProActiveRuntime.createLocalNode(String, boolean, ProActiveSecurityManager, String, String)

killAllNodes

public void killAllNodes()
Description copied from interface: ProActiveRuntime
Kills all Nodes in this ProActiveRuntime

Specified by:
killAllNodes in interface ProActiveRuntime
See Also:
ProActiveRuntime.killAllNodes()

killNode

public void killNode(java.lang.String nodeName)
Description copied from interface: ProActiveRuntime
Kills the Node of the given name and all Active Objects deployed on it.

Specified by:
killNode in interface ProActiveRuntime
Parameters:
nodeName - the name of the node to kill
See Also:
ProActiveRuntime.killNode(String)

createVM

public void createVM(UniversalProcess remoteProcess)
              throws java.io.IOException
Description copied from interface: ProActiveRuntime
Creates a new ProActiveRuntime associated with a new VM on the host defined in the given process.

Specified by:
createVM in interface ProActiveRuntime
Parameters:
remoteProcess - the process that will originate the creation of the runtime
Throws:
java.io.IOException - if the new VM cannot be created
See Also:
ProActiveRuntime.createVM(UniversalProcess)

getLocalNodeNames

public java.lang.String[] getLocalNodeNames()
Description copied from interface: ProActiveRuntime
Returns the name of all nodes known by this ProActiveRuntime on this VM

Specified by:
getLocalNodeNames in interface ProActiveRuntime
Returns:
the name of all nodes known by this ProActiveRuntime on this VM
See Also:
ProActiveRuntime.getLocalNodeNames()

getVMInformation

public VMInformation getVMInformation()
Description copied from interface: ProActiveRuntime
Returns the JVM information as one object. This method allows to retrieve all JVM information in one call to optimize performance.

Specified by:
getVMInformation in interface ProActiveRuntime
Returns:
the JVM information as one object
See Also:
ProActiveRuntime.getVMInformation()

register

public void register(ProActiveRuntime proActiveRuntimeDist,
                     java.lang.String proActiveRuntimeName,
                     java.lang.String creatorID,
                     java.lang.String creationProtocol,
                     java.lang.String vmName)
Description copied from interface: ProActiveRuntime
**For internal use only** Allows this ProActiveRuntime on this VM to register another ProActiveRuntime

Specified by:
register in interface ProActiveRuntime
Parameters:
proActiveRuntimeDist - the remote ProactiveRuntime to register
proActiveRuntimeName - the url of the remote ProActiveRuntime
creatorID - the name of the creator of the remote ProActiveRuntime
creationProtocol - the protocol used to register the remote ProActiveRuntime when created
See Also:
ProActiveRuntime.register(ProActiveRuntime, String, String, String, String)

unregister

public void unregister(ProActiveRuntime proActiveRuntimeDist,
                       java.lang.String proActiveRuntimeUrl,
                       java.lang.String creatorID,
                       java.lang.String creationProtocol,
                       java.lang.String vmName)
Description copied from interface: ProActiveRuntime
**For internal use only** Allows this ProactiveRuntime on this VM to unregister an already resigesterd ProActiveRuntime.

Specified by:
unregister in interface ProActiveRuntime
Parameters:
proActiveRuntimeDist - the remote ProactiveRuntime to unregister.
proActiveRuntimeUrl - the url of the remote ProActiveRuntime
creatorID - the name of the creator of the remote ProActiveRuntime
creationProtocol - the protocol used to register the remote ProActiveRuntime when created
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()
Description copied from interface: ProActiveRuntime
Returns all the ProActiveRuntime registered on this ProActiveRuntime on this VM

Specified by:
getProActiveRuntimes in interface ProActiveRuntime
Returns:
all the ProActiveRuntime registered on this ProActiveRuntime on this VM
See Also:
ProActiveRuntime.getProActiveRuntimes()

getProActiveRuntime

public ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName)
Description copied from interface: ProActiveRuntime
Returns the ProActiveRuntime of specified name

Specified by:
getProActiveRuntime in interface ProActiveRuntime
Parameters:
proActiveRuntimeName - the name of the ProActiveruntime to return
Returns:
the ProActiveRuntime of specified name
See Also:
ProActiveRuntime.getProActiveRuntime(String)

addAcquaintance

public void addAcquaintance(java.lang.String proActiveRuntimeName)
Description copied from interface: ProActiveRuntime
**For internal use only** Tells this runtime that it's registered in another one

Specified by:
addAcquaintance in interface ProActiveRuntime
Parameters:
proActiveRuntimeName - the name of the remote ProActiveRuntime in which this runtime is registered
See Also:
ProActiveRuntime.addAcquaintance(String)

getAcquaintances

public java.lang.String[] getAcquaintances()
Description copied from interface: ProActiveRuntime
Returns all the ProActiveRuntime URL in which this runtime is registered

Specified by:
getAcquaintances in interface ProActiveRuntime
Returns:
all the ProActiveRuntime URL in which this runtime is registered
See Also:
ProActiveRuntime.getAcquaintances()

rmAcquaintance

public void rmAcquaintance(java.lang.String proActiveRuntimeName)
Description copied from interface: ProActiveRuntime
**For internal use only** . Tell to this runtime that is no more registered in proActiveRuntimeName.

Specified by:
rmAcquaintance in interface ProActiveRuntime
Parameters:
proActiveRuntimeName - the name of the remote ProActiveRuntime.
See Also:
ProActiveRuntime.rmAcquaintance(java.lang.String)

killRT

public void killRT(boolean softly)
Description copied from interface: ProActiveRuntime
Kills this ProActiveRuntime and this VM

Specified by:
killRT in interface ProActiveRuntime
Parameters:
softly - if false, this Runtime is killed abruptely if true, if that runtime originates the creation of a rmi registry, it waits until the registry is empty before dying. To be more precise a thread is created to ask periodically the registry if objects are still registered.
See Also:
ProActiveRuntime.killRT(boolean)

getURL

public java.lang.String getURL()
Description copied from interface: ProActiveRuntime
Returns the url of this ProActiveRuntime on the local or remote VM

Specified by:
getURL in interface ProActiveRuntime
See Also:
ProActiveRuntime.getURL()

getActiveObjects

public java.util.ArrayList getActiveObjects(java.lang.String nodeName)
Description copied from interface: ProActiveRuntime
Returns all Active Objects deployed on the node with the given name on this ProActiveRuntime

Specified by:
getActiveObjects in interface ProActiveRuntime
Parameters:
nodeName - the name of the node
Returns:
ArrayList of ArrayList. The latter contains [body, classname].

getVirtualNode

public VirtualNode getVirtualNode(java.lang.String virtualNodeName)
Description copied from interface: ProActiveRuntime
Returns the VirtualNode with the given name

Specified by:
getVirtualNode in interface ProActiveRuntime
Parameters:
virtualNodeName - the name of the VirtualNode to be acquired
Returns:
VirtualNode the virtualnode of the given name or null if such virtualNode does not exist, or has not been yet activated.

registerVirtualNode

public void registerVirtualNode(java.lang.String virtualNodeName,
                                boolean replacePreviousBinding)
Description copied from interface: ProActiveRuntime
Registers the virtualNode of the given name in a registry such RMIRegistry or Jini Service Lookup

Specified by:
registerVirtualNode in interface ProActiveRuntime
Parameters:
virtualNodeName -

unregisterVirtualNode

public void unregisterVirtualNode(java.lang.String virtualNodeName)
Description copied from interface: ProActiveRuntime
Unregisters the VirtualNode of the given name from the local runtime.

Specified by:
unregisterVirtualNode in interface ProActiveRuntime
Parameters:
virtualNodeName - the virtualNode to unregister.

unregisterAllVirtualNodes

public void unregisterAllVirtualNodes()
Description copied from interface: ProActiveRuntime
Unregisters all VirtualNodes from the local runtime

Specified by:
unregisterAllVirtualNodes in interface ProActiveRuntime

getJobID

public java.lang.String getJobID(java.lang.String nodeUrl)
Specified by:
getJobID in interface ProActiveRuntime
Parameters:
nodeUrl -
Returns:
the jobId of the node with the given name
See Also:
ProActiveRuntime.getJobID(java.lang.String)

getActiveObjects

public java.util.ArrayList getActiveObjects(java.lang.String nodeName,
                                            java.lang.String className)
Description copied from interface: ProActiveRuntime
Returns all Active Objects with the specified class name, deployed on the node with the given name on this ProActiveRuntime

Specified by:
getActiveObjects in interface ProActiveRuntime
Parameters:
nodeName - the name of the node
className - class of the Active Objects to look for
Returns:
Active Objects of the specified class name deployed on this ProactiveRuntime

createBody

public UniversalBody createBody(java.lang.String nodeName,
                                ConstructorCall bodyConstructorCall,
                                boolean isLocal)
                         throws ConstructorCallExecutionFailedException,
                                java.lang.reflect.InvocationTargetException
Description copied from interface: ProActiveRuntime

This method is the basis for creating remote active objects. It receives a ConstructorCall that is the constructor call of the body of the active object to create. Inside the parameters of this constructor call is the constructor call of the reified object. Upon execution of the constructor call of the body, the body holding a reference on the reified object will get created and returned.

The method returns a reference on the RMI stub of the newly created body.

Specified by:
createBody in interface ProActiveRuntime
Parameters:
nodeName - the name of the node the newly created active object will be associated to
bodyConstructorCall - the Constructor call allowing to create the body
isLocal - boolean. True if proxy and body are on the same vm, false otherwise
Returns:
a stub on the newly created body.
Throws:
java.lang.reflect.InvocationTargetException - if the java constructor execution failed
ConstructorCallExecutionFailedException - if the constructor call cannot be executed
See Also:
ProActiveRuntime.createBody(String, ConstructorCall, boolean)

receiveBody

public UniversalBody receiveBody(java.lang.String nodeName,
                                 Body body)
Description copied from interface: ProActiveRuntime

This method is the basis for migrating active objects. It receives a Body that embbeds the reified object and its graph of passive objects. Once transfered remotely using serialization, the body should restart itself and perform all updates needed to be functionning.

The method returns a reference on the RMI stub of the migrated body.

Specified by:
receiveBody in interface ProActiveRuntime
Parameters:
nodeName - the name of the node the newly created active object will be associated to
body - the body of the active object migrating to this node.
Returns:
a RMI stub on the migrated body.
See Also:
ProActiveRuntime.receiveBody(String, Body)

receiveCheckpoint

public UniversalBody receiveCheckpoint(java.lang.String nodeURL,
                                       Checkpoint ckpt,
                                       int inc)
Description copied from interface: ProActiveRuntime
The runtime recovers the body contained in the checkpoint ckpt.

Specified by:
receiveCheckpoint in interface ProActiveRuntime
Parameters:
nodeURL - node on which the body is restarted
ckpt - checkpoint to use for recovery
inc - incarnation number of this recovery
Returns:
*not used*
See Also:
ProActiveRuntime.receiveCheckpoint(String, Checkpoint, int)

setProActiveSecurityManager

public static void setProActiveSecurityManager(ProActiveSecurityManager server)
set the runtime security manager


setDefaultNodeVirtualNodeName

public void setDefaultNodeVirtualNodeName(java.lang.String s)

getNodePolicyServer

public PolicyServer getNodePolicyServer(java.lang.String nodeName)

getEntities

public java.util.ArrayList getEntities(java.lang.String nodeName)

getEntities

public java.util.ArrayList getEntities(SecurityEntity securityEntity)
the runtime looks for a matching security entity whithin its nodes and active objects

Parameters:
securityEntity - the security entity looked for.
Returns:
matching entities

getEntities

public java.util.ArrayList getEntities()
Description copied from interface: SecurityEntity
Retrieves all the entity's ID which contain this entity plus this entity ID.

Specified by:
getEntities in interface SecurityEntity
Returns:
returns all the entity's ID which contain this entity plus this entity ID.

getPolicy

public SecurityContext getPolicy(SecurityContext sc)
                          throws SecurityNotAvailableException
Description copied from interface: SecurityEntity
Ask the entity to fill the securityContext parameters with its own policy according to the communication details contained in the given securityContext

Specified by:
getPolicy in interface SecurityEntity
Parameters:
sc -
Returns:
securityContext filled with this entity's policy
Throws:
SecurityNotAvailableException - thrown the entity doest not support the security

getJobID

public java.lang.String getJobID()
Specified by:
getJobID in interface Job
Returns:
the jobID associated with this object
See Also:
Job.getJobID()

getClassDataFromParentRuntime

public byte[] getClassDataFromParentRuntime(java.lang.String className)
                                     throws ProActiveException
Description copied from interface: ProActiveRuntime
Looks for class bytecode in the ancestors of the current runtime : first it tries in the father runtime, then in the grand-father etc...

Specified by:
getClassDataFromParentRuntime in interface ProActiveRuntime
Parameters:
className - name of the class
Returns:
the bytecode corresponding to the given class, or null if not found
Throws:
ProActiveException - if a problem occurs due to the remote nature of this ProActiveRuntime

getClassDataFromThisRuntime

public byte[] getClassDataFromThisRuntime(java.lang.String className)
                                   throws ProActiveException
Description copied from interface: ProActiveRuntime
Looks for class bytecode in the current runtime. If current runtime has no father, stub generation can be intented to get the class bytecode

Specified by:
getClassDataFromThisRuntime in interface ProActiveRuntime
Parameters:
className - name of the class
Returns:
the bytecode corresponding to the given class, or null if not found
Throws:
ProActiveException - if a problem occurs due to the remote nature of this ProActiveRuntime

launchMain

public void launchMain(java.lang.String className,
                       java.lang.String[] parameters)
                throws java.lang.ClassNotFoundException,
                       java.lang.NoSuchMethodException,
                       ProActiveException
Description copied from interface: ProActiveRuntime
launch the main method of the main class with parameters

Specified by:
launchMain in interface ProActiveRuntime
Parameters:
className -
parameters -
Throws:
ProActiveException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException

newRemote

public void newRemote(java.lang.String className)
               throws java.lang.ClassNotFoundException,
                      ProActiveException
Description copied from interface: ProActiveRuntime
construct a new instance remotly

Specified by:
newRemote in interface ProActiveRuntime
Parameters:
className - class to instance
Throws:
java.lang.ClassNotFoundException
ProActiveException

terminateSession

public void terminateSession(long sessionID)
                      throws SecurityNotAvailableException
Description copied from interface: SecurityEntity
terminate a given session

Specified by:
terminateSession in interface SecurityEntity
Parameters:
sessionID -
Throws:
SecurityNotAvailableException - id security is not available

getCertificate

public java.security.cert.X509Certificate getCertificate()
                                                  throws SecurityNotAvailableException
Description copied from interface: SecurityEntity
entity certificate

Specified by:
getCertificate in interface SecurityEntity
Returns:
returns entity certificate
Throws:
SecurityNotAvailableException - if security is not available

getProActiveSecurityManager

public ProActiveSecurityManager getProActiveSecurityManager()

startNewSession

public long startNewSession(Communication policy)
                     throws SecurityNotAvailableException,
                            RenegotiateSessionException
Description copied from interface: SecurityEntity
start an unvalidated empty session

Specified by:
startNewSession in interface SecurityEntity
Parameters:
policy - policy associated to the session
Returns:
session ID
Throws:
RenegotiateSessionException - if the session immediatly expires
SecurityNotAvailableException - if security is not available

getPublicKey

public java.security.PublicKey getPublicKey()
                                     throws SecurityNotAvailableException
Description copied from interface: SecurityEntity
entity public key

Specified by:
getPublicKey in interface SecurityEntity
Returns:
returns entity public key
Throws:
SecurityNotAvailableException

randomValue

public byte[] randomValue(long sessionID,
                          byte[] clientRandomValue)
                   throws SecurityNotAvailableException
Description copied from interface: SecurityEntity
Exchange random value between client and server entity

Specified by:
randomValue in interface SecurityEntity
Parameters:
sessionID - the session ID
clientRandomValue - client random value
Returns:
server random value
Throws:
SecurityNotAvailableException - if the security is not available

publicKeyExchange

public byte[][] publicKeyExchange(long sessionID,
                                  byte[] myPublicKey,
                                  byte[] myCertificate,
                                  byte[] signature)
                           throws SecurityNotAvailableException,
                                  RenegotiateSessionException
Description copied from interface: SecurityEntity
exchange entity certificate and/or public key if certificate are not available

Specified by:
publicKeyExchange in interface SecurityEntity
Parameters:
sessionID - the session ID
myPublicKey - encoded public key
myCertificate - encoded certificate
signature - encoded signature of previous paramaters
Returns:
an array containing : - server certificate and/or server public key - encoded signature of these parameters
Throws:
SecurityNotAvailableException - if the security is not available
RenegotiateSessionException - if the session has expired

secretKeyExchange

public byte[][] secretKeyExchange(long sessionID,
                                  byte[] encodedAESKey,
                                  byte[] encodedIVParameters,
                                  byte[] encodedClientMacKey,
                                  byte[] encodedLockData,
                                  byte[] parametersSignature)
                           throws SecurityNotAvailableException,
                                  RenegotiateSessionException
Description copied from interface: SecurityEntity
this method sends encoded secret parameters to the target entity

Specified by:
secretKeyExchange in interface SecurityEntity
Parameters:
sessionID - session ID
encodedAESKey - the AES key use to exchange secret message
encodedIVParameters - Initilization parameters for the AES key
encodedClientMacKey - MAC key for checking signature of future messages
encodedLockData - random value to prevent message replays by an external attacker
parametersSignature - encoded signature of the previous parameters
Returns:
an array containing : - encoded server AES key - encoded IV parameters - encoded server MAC key - encoded lock data to prevent message replays - encoded signature of previous parameters
Throws:
RenegotiateSessionException - if the session has expired or has been cancelled during this exchange
SecurityNotAvailableException - if this entity does not support security

getCertificateEncoded

public byte[] getCertificateEncoded()
                             throws SecurityNotAvailableException
Description copied from interface: SecurityEntity
Entity's X509Certificate as byte array

Specified by:
getCertificateEncoded in interface SecurityEntity
Returns:
entity's X509Certificate as byte array
Throws:
SecurityNotAvailableException

getProcessToDeploy

public ExternalProcess getProcessToDeploy(ProActiveRuntime proActiveRuntimeDist,
                                          java.lang.String creatorID,
                                          java.lang.String vmName,
                                          java.lang.String padURL)
                                   throws ProActiveException
Description copied from interface: ProActiveRuntime
Ask proActiveRuntimeDist for the process with given ids: padURL, creatorID, vmName. Used for hierarchical deployment.

Specified by:
getProcessToDeploy in interface ProActiveRuntime
Parameters:
proActiveRuntimeDist -
creatorID -
vmName -
padURL -
Returns:
the process with given ids: padURL, creatorID, vmName
Throws:
ProActiveException

getVNName

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


Copyright 2001-2005 INRIA All Rights Reserved.