|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.event.AbstractEventProducer
org.objectweb.proactive.core.event.RuntimeRegistrationEventProducerImpl
org.objectweb.proactive.core.runtime.ProActiveRuntimeImpl
Implementation of ProActiveRuntime
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 |
protected ProActiveRuntimeImpl()
Method Detail |
protected static int getNextInt()
public static ProActiveRuntime getProActiveRuntime()
public void registerLocalVirtualNode(VirtualNode vn, java.lang.String vnName)
LocalProActiveRuntime
registerLocalVirtualNode
in interface LocalProActiveRuntime
vn
- the virtualnode to registervnName
- the name of the VirtualNode to registerLocalProActiveRuntime.registerLocalVirtualNode(VirtualNode vn, String vnName)
public void setParent(ProActiveRuntime parentPARuntime)
LocalProActiveRuntime
setParent
in interface LocalProActiveRuntime
parentPARuntime
- the creator of this runtimeLocalProActiveRuntime.setParent(ProActiveRuntime parentPARuntime)
public void registerDescriptor(java.lang.String url, ProActiveDescriptor pad)
public ProActiveDescriptor getDescriptor(java.lang.String url, boolean isHierarchicalSearch) throws java.io.IOException, ProActiveException
ProActiveRuntime
getDescriptor
in interface ProActiveRuntime
url
- url of the padisHierarchicalSearch
- if yes search for the pad hierarchically
ProActiveException
java.io.IOException
public void removeDescriptor(java.lang.String url)
public java.lang.String createLocalNode(java.lang.String nodeName, boolean replacePreviousBinding, ProActiveSecurityManager nodeSecurityManager, java.lang.String vnName, java.lang.String jobId) throws NodeException
ProActiveRuntime
createLocalNode
in interface ProActiveRuntime
nodeName
- the name of the node to create localyreplacePreviousBinding
-
NodeException
- if the new node cannot be createdProActiveRuntime.createLocalNode(String, boolean, ProActiveSecurityManager, String, String)
public void killAllNodes()
ProActiveRuntime
killAllNodes
in interface ProActiveRuntime
ProActiveRuntime.killAllNodes()
public void killNode(java.lang.String nodeName)
ProActiveRuntime
killNode
in interface ProActiveRuntime
nodeName
- the name of the node to killProActiveRuntime.killNode(String)
public void createVM(UniversalProcess remoteProcess) throws java.io.IOException
ProActiveRuntime
createVM
in interface ProActiveRuntime
remoteProcess
- the process that will originate the creation of the runtime
java.io.IOException
- if the new VM cannot be createdProActiveRuntime.createVM(UniversalProcess)
public java.lang.String[] getLocalNodeNames()
ProActiveRuntime
getLocalNodeNames
in interface ProActiveRuntime
ProActiveRuntime.getLocalNodeNames()
public VMInformation getVMInformation()
ProActiveRuntime
getVMInformation
in interface ProActiveRuntime
ProActiveRuntime.getVMInformation()
public void register(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeName, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
ProActiveRuntime
register
in interface ProActiveRuntime
proActiveRuntimeDist
- the remote ProactiveRuntime to registerproActiveRuntimeName
- the url of the remote ProActiveRuntimecreatorID
- the name of the creator of the remote ProActiveRuntimecreationProtocol
- the protocol used to register the remote ProActiveRuntime when createdProActiveRuntime.register(ProActiveRuntime, String, String, String, String)
public void unregister(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeUrl, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
ProActiveRuntime
unregister
in interface ProActiveRuntime
proActiveRuntimeDist
- the remote ProactiveRuntime to unregister.proActiveRuntimeUrl
- the url of the remote ProActiveRuntimecreatorID
- the name of the creator of the remote ProActiveRuntimecreationProtocol
- the protocol used to register the remote ProActiveRuntime when createdProActiveRuntime.unregister(org.objectweb.proactive.core.runtime.ProActiveRuntime, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public ProActiveRuntime[] getProActiveRuntimes()
ProActiveRuntime
getProActiveRuntimes
in interface ProActiveRuntime
ProActiveRuntime.getProActiveRuntimes()
public ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName)
ProActiveRuntime
getProActiveRuntime
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the ProActiveruntime to return
ProActiveRuntime.getProActiveRuntime(String)
public void addAcquaintance(java.lang.String proActiveRuntimeName)
ProActiveRuntime
addAcquaintance
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the remote ProActiveRuntime in which this runtime is registeredProActiveRuntime.addAcquaintance(String)
public java.lang.String[] getAcquaintances()
ProActiveRuntime
getAcquaintances
in interface ProActiveRuntime
ProActiveRuntime.getAcquaintances()
public void rmAcquaintance(java.lang.String proActiveRuntimeName)
ProActiveRuntime
proActiveRuntimeName
.
rmAcquaintance
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the remote ProActiveRuntime.ProActiveRuntime.rmAcquaintance(java.lang.String)
public void killRT(boolean softly)
ProActiveRuntime
killRT
in interface ProActiveRuntime
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.ProActiveRuntime.killRT(boolean)
public java.lang.String getURL()
ProActiveRuntime
getURL
in interface ProActiveRuntime
ProActiveRuntime.getURL()
public java.util.ArrayList getActiveObjects(java.lang.String nodeName)
ProActiveRuntime
getActiveObjects
in interface ProActiveRuntime
nodeName
- the name of the node
public VirtualNode getVirtualNode(java.lang.String virtualNodeName)
ProActiveRuntime
getVirtualNode
in interface ProActiveRuntime
virtualNodeName
- the name of the VirtualNode to be acquired
public void registerVirtualNode(java.lang.String virtualNodeName, boolean replacePreviousBinding)
ProActiveRuntime
registerVirtualNode
in interface ProActiveRuntime
virtualNodeName
- public void unregisterVirtualNode(java.lang.String virtualNodeName)
ProActiveRuntime
unregisterVirtualNode
in interface ProActiveRuntime
virtualNodeName
- the virtualNode to unregister.public void unregisterAllVirtualNodes()
ProActiveRuntime
unregisterAllVirtualNodes
in interface ProActiveRuntime
public java.lang.String getJobID(java.lang.String nodeUrl)
getJobID
in interface ProActiveRuntime
nodeUrl
-
ProActiveRuntime.getJobID(java.lang.String)
public java.util.ArrayList getActiveObjects(java.lang.String nodeName, java.lang.String className)
ProActiveRuntime
getActiveObjects
in interface ProActiveRuntime
nodeName
- the name of the nodeclassName
- class of the Active Objects to look for
public UniversalBody createBody(java.lang.String nodeName, ConstructorCall bodyConstructorCall, boolean isLocal) throws ConstructorCallExecutionFailedException, java.lang.reflect.InvocationTargetException
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.
createBody
in interface ProActiveRuntime
nodeName
- the name of the node the newly created active object will be associated tobodyConstructorCall
- the Constructor call allowing to create the bodyisLocal
- boolean. True if proxy and body are on the same vm, false otherwise
java.lang.reflect.InvocationTargetException
- if the java constructor execution failed
ConstructorCallExecutionFailedException
- if the constructor call cannot be executedProActiveRuntime.createBody(String, ConstructorCall, boolean)
public UniversalBody receiveBody(java.lang.String nodeName, Body body)
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.
receiveBody
in interface ProActiveRuntime
nodeName
- the name of the node the newly created active object will be associated tobody
- the body of the active object migrating to this node.
ProActiveRuntime.receiveBody(String, Body)
public UniversalBody receiveCheckpoint(java.lang.String nodeURL, Checkpoint ckpt, int inc)
ProActiveRuntime
receiveCheckpoint
in interface ProActiveRuntime
nodeURL
- node on which the body is restartedckpt
- checkpoint to use for recoveryinc
- incarnation number of this recovery
ProActiveRuntime.receiveCheckpoint(String, Checkpoint, int)
public static void setProActiveSecurityManager(ProActiveSecurityManager server)
public void setDefaultNodeVirtualNodeName(java.lang.String s)
public PolicyServer getNodePolicyServer(java.lang.String nodeName)
public java.util.ArrayList getEntities(java.lang.String nodeName)
public java.util.ArrayList getEntities(SecurityEntity securityEntity)
securityEntity
- the security entity looked for.
public java.util.ArrayList getEntities()
SecurityEntity
getEntities
in interface SecurityEntity
public SecurityContext getPolicy(SecurityContext sc) throws SecurityNotAvailableException
SecurityEntity
getPolicy
in interface SecurityEntity
sc
-
SecurityNotAvailableException
- thrown the entity doest not support the securitypublic java.lang.String getJobID()
getJobID
in interface Job
Job.getJobID()
public byte[] getClassDataFromParentRuntime(java.lang.String className) throws ProActiveException
ProActiveRuntime
getClassDataFromParentRuntime
in interface ProActiveRuntime
className
- name of the class
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic byte[] getClassDataFromThisRuntime(java.lang.String className) throws ProActiveException
ProActiveRuntime
getClassDataFromThisRuntime
in interface ProActiveRuntime
className
- name of the class
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic void launchMain(java.lang.String className, java.lang.String[] parameters) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, ProActiveException
ProActiveRuntime
launchMain
in interface ProActiveRuntime
className
- parameters
-
ProActiveException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
public void newRemote(java.lang.String className) throws java.lang.ClassNotFoundException, ProActiveException
ProActiveRuntime
newRemote
in interface ProActiveRuntime
className
- class to instance
java.lang.ClassNotFoundException
ProActiveException
public void terminateSession(long sessionID) throws SecurityNotAvailableException
SecurityEntity
terminateSession
in interface SecurityEntity
sessionID
-
SecurityNotAvailableException
- id security is not availablepublic java.security.cert.X509Certificate getCertificate() throws SecurityNotAvailableException
SecurityEntity
getCertificate
in interface SecurityEntity
SecurityNotAvailableException
- if security is not availablepublic ProActiveSecurityManager getProActiveSecurityManager()
public long startNewSession(Communication policy) throws SecurityNotAvailableException, RenegotiateSessionException
SecurityEntity
startNewSession
in interface SecurityEntity
policy
- policy associated to the session
RenegotiateSessionException
- if the session immediatly expires
SecurityNotAvailableException
- if security is not availablepublic java.security.PublicKey getPublicKey() throws SecurityNotAvailableException
SecurityEntity
getPublicKey
in interface SecurityEntity
SecurityNotAvailableException
public byte[] randomValue(long sessionID, byte[] clientRandomValue) throws SecurityNotAvailableException
SecurityEntity
randomValue
in interface SecurityEntity
sessionID
- the session IDclientRandomValue
- client random value
SecurityNotAvailableException
- if the security is not availablepublic byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey, byte[] myCertificate, byte[] signature) throws SecurityNotAvailableException, RenegotiateSessionException
SecurityEntity
publicKeyExchange
in interface SecurityEntity
sessionID
- the session IDmyPublicKey
- encoded public keymyCertificate
- encoded certificatesignature
- encoded signature of previous paramaters
SecurityNotAvailableException
- if the security is not available
RenegotiateSessionException
- if the session has expiredpublic byte[][] secretKeyExchange(long sessionID, byte[] encodedAESKey, byte[] encodedIVParameters, byte[] encodedClientMacKey, byte[] encodedLockData, byte[] parametersSignature) throws SecurityNotAvailableException, RenegotiateSessionException
SecurityEntity
secretKeyExchange
in interface SecurityEntity
sessionID
- session IDencodedAESKey
- the AES key use to exchange secret messageencodedIVParameters
- Initilization parameters for the AES keyencodedClientMacKey
- MAC key for checking signature of future messagesencodedLockData
- random value to prevent message replays by an external attackerparametersSignature
- encoded signature of the previous parameters
RenegotiateSessionException
- if the session has expired or has been cancelled during this exchange
SecurityNotAvailableException
- if this entity does not support securitypublic byte[] getCertificateEncoded() throws SecurityNotAvailableException
SecurityEntity
getCertificateEncoded
in interface SecurityEntity
SecurityNotAvailableException
public ExternalProcess getProcessToDeploy(ProActiveRuntime proActiveRuntimeDist, java.lang.String creatorID, java.lang.String vmName, java.lang.String padURL) throws ProActiveException
ProActiveRuntime
getProcessToDeploy
in interface ProActiveRuntime
proActiveRuntimeDist
- creatorID
- vmName
- padURL
-
ProActiveException
public java.lang.String getVNName(java.lang.String nodename) throws ProActiveException
getVNName
in interface ProActiveRuntime
ProActiveException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |