|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.runtime.ProActiveRuntimeAdapter
org.objectweb.proactive.core.runtime.ProActiveRuntimeAdapterImpl
An adapter for a RemoteProActiveRuntime. The Adpater is the generic entry point for remote calls to a RemoteProActiveRuntime using different protocols such as RMI, RMISSH, IBIS, HTTP, JINI. This also allows to cache informations, and so to avoid crossing the network when calling some methods.
Field Summary | |
protected boolean |
alreadykilled
|
protected RemoteProActiveRuntime |
proActiveRuntime
|
protected java.lang.String |
proActiveRuntimeURL
|
Fields inherited from class org.objectweb.proactive.core.runtime.ProActiveRuntimeAdapter |
vmInformation |
Fields inherited from interface org.objectweb.proactive.core.runtime.ProActiveRuntime |
runtimeLogger |
Constructor Summary | |
ProActiveRuntimeAdapterImpl()
|
|
ProActiveRuntimeAdapterImpl(RemoteProActiveRuntime proActiveRuntime)
|
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 isNodeLocal)
This method is the basis for creating remote active objects. |
java.lang.String |
createLocalNode(java.lang.String nodeName,
boolean replacePreviousBinding,
ProActiveSecurityManager policyServer,
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. |
boolean |
equals(java.lang.Object o)
|
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.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 |
SecurityContext |
getPolicy(SecurityContext securityContext)
Ask the entity to fill the securityContext parameters with its own policy according to the communication details contained in the given securityContext |
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 |
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)
|
int |
hashCode()
|
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 |
protected java.lang.Object |
readResolve()
|
UniversalBody |
receiveBody(java.lang.String nodeName,
Body body)
This method is the basis for migrating active objects. |
UniversalBody |
receiveCheckpoint(java.lang.String nodeName,
Checkpoint ckpt,
int inc)
The runtime recovers the body contained in the checkpoint ckpt. |
void |
register(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 register another 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 |
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 |
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 java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected RemoteProActiveRuntime proActiveRuntime
protected java.lang.String proActiveRuntimeURL
protected boolean alreadykilled
Constructor Detail |
public ProActiveRuntimeAdapterImpl()
public ProActiveRuntimeAdapterImpl(RemoteProActiveRuntime proActiveRuntime) throws ProActiveException
Method Detail |
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String createLocalNode(java.lang.String nodeName, boolean replacePreviousBinding, ProActiveSecurityManager policyServer, 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
ProActiveRuntime.createLocalNode(java.lang.String, boolean, ProActiveSecurityManager, java.lang.String, java.lang.String)
public void killAllNodes() throws ProActiveException
ProActiveRuntime
killAllNodes
in interface ProActiveRuntime
ProActiveException
ProActiveRuntime.killAllNodes()
public void killNode(java.lang.String nodeName) throws ProActiveException
ProActiveRuntime
killNode
in interface ProActiveRuntime
nodeName
- the name of the node to kill
ProActiveException
ProActiveRuntime.killNode(java.lang.String)
public void createVM(UniversalProcess remoteProcess) throws java.io.IOException, ProActiveException
ProActiveRuntime
createVM
in interface ProActiveRuntime
remoteProcess
- the process that will originate the creation of the runtime
java.io.IOException
ProActiveException
ProActiveRuntime.createVM(org.objectweb.proactive.core.process.UniversalProcess)
public java.lang.String[] getLocalNodeNames() throws ProActiveException
ProActiveRuntime
getLocalNodeNames
in interface ProActiveRuntime
ProActiveException
ProActiveRuntime.getLocalNodeNames()
public VMInformation getVMInformation()
ProActiveRuntime
getVMInformation
in interface ProActiveRuntime
ProActiveRuntime.getVMInformation()
public void register(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeUrl, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName) throws ProActiveException
ProActiveRuntime
register
in interface ProActiveRuntime
proActiveRuntimeDist
- the remote ProactiveRuntime to registerproActiveRuntimeUrl
- the url of the remote ProActiveRuntimecreatorID
- the name of the creator of the remote ProActiveRuntimecreationProtocol
- the protocol used to register the remote ProActiveRuntime when created
ProActiveException
ProActiveRuntime.register(org.objectweb.proactive.core.runtime.ProActiveRuntime, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void unregister(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeUrl, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName) throws ProActiveException
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 created
ProActiveException
ProActiveRuntime.unregister(org.objectweb.proactive.core.runtime.ProActiveRuntime, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public ProActiveRuntime[] getProActiveRuntimes() throws ProActiveException
ProActiveRuntime
getProActiveRuntimes
in interface ProActiveRuntime
ProActiveException
ProActiveRuntime.getProActiveRuntimes()
public ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName) throws ProActiveException
ProActiveRuntime
getProActiveRuntime
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the ProActiveruntime to return
ProActiveException
ProActiveRuntime.getProActiveRuntime(java.lang.String)
public void addAcquaintance(java.lang.String proActiveRuntimeName) throws ProActiveException
ProActiveRuntime
addAcquaintance
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the remote ProActiveRuntime in which this runtime is registered
ProActiveException
ProActiveRuntime.addAcquaintance(java.lang.String)
public java.lang.String[] getAcquaintances() throws ProActiveException
ProActiveRuntime
getAcquaintances
in interface ProActiveRuntime
ProActiveException
ProActiveRuntime.getAcquaintances()
public void rmAcquaintance(java.lang.String proActiveRuntimeName) throws ProActiveException
ProActiveRuntime
proActiveRuntimeName
.
rmAcquaintance
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the remote ProActiveRuntime.
ProActiveException
ProActiveRuntime.rmAcquaintance(java.lang.String)
public void killRT(boolean softly) throws java.lang.Exception
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.
java.lang.Exception
- if a problem occurs when killing this ProActiveRuntimeProActiveRuntime.killRT(boolean)
public java.lang.String getURL()
ProActiveRuntime
getURL
in interface ProActiveRuntime
ProActiveRuntime.getURL()
public java.util.ArrayList getActiveObjects(java.lang.String nodeName) throws ProActiveException
ProActiveRuntime
getActiveObjects
in interface ProActiveRuntime
nodeName
- the name of the node
ProActiveException
ProActiveRuntime.getActiveObjects(java.lang.String)
public java.util.ArrayList getActiveObjects(java.lang.String nodeName, java.lang.String className) throws ProActiveException
ProActiveRuntime
getActiveObjects
in interface ProActiveRuntime
nodeName
- the name of the nodeclassName
- class of the Active Objects to look for
ProActiveException
ProActiveRuntime.getActiveObjects(java.lang.String, java.lang.String)
public VirtualNode getVirtualNode(java.lang.String virtualNodeName) throws ProActiveException
ProActiveRuntime
getVirtualNode
in interface ProActiveRuntime
virtualNodeName
- the name of the VirtualNode to be acquired
ProActiveException
ProActiveRuntime.getVirtualNode(java.lang.String)
public void registerVirtualNode(java.lang.String virtualNodeName, boolean replacePreviousBinding) throws ProActiveException
ProActiveRuntime
registerVirtualNode
in interface ProActiveRuntime
virtualNodeName
-
ProActiveException
ProActiveRuntime.registerVirtualNode(java.lang.String, boolean)
public void unregisterVirtualNode(java.lang.String virtualNodeName) throws ProActiveException
ProActiveRuntime
unregisterVirtualNode
in interface ProActiveRuntime
virtualNodeName
- the virtualNode to unregister.
ProActiveException
ProActiveRuntime.unregisterVirtualNode(java.lang.String)
public void unregisterAllVirtualNodes() throws ProActiveException
ProActiveRuntime
unregisterAllVirtualNodes
in interface ProActiveRuntime
ProActiveException
ProActiveRuntime.unregisterAllVirtualNodes()
public java.lang.String getJobID(java.lang.String nodeUrl) throws ProActiveException
getJobID
in interface ProActiveRuntime
nodeUrl
-
ProActiveException
ProActiveRuntime.getJobID(java.lang.String)
public UniversalBody createBody(java.lang.String nodeName, ConstructorCall bodyConstructorCall, boolean isNodeLocal) throws ConstructorCallExecutionFailedException, java.lang.reflect.InvocationTargetException, ProActiveException
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 bodyisNodeLocal
- boolean. True if proxy and body are on the same vm, false otherwise
ProActiveException
java.lang.reflect.InvocationTargetException
- if the java constructor execution failed
ConstructorCallExecutionFailedException
- if the constructor call cannot be executedProActiveRuntime.createBody(java.lang.String, org.objectweb.proactive.core.mop.ConstructorCall, boolean)
public UniversalBody receiveBody(java.lang.String nodeName, Body body) throws ProActiveException
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.
ProActiveException
ProActiveRuntime.receiveBody(java.lang.String, org.objectweb.proactive.Body)
public UniversalBody receiveCheckpoint(java.lang.String nodeName, Checkpoint ckpt, int inc) throws ProActiveException
ProActiveRuntime
receiveCheckpoint
in interface ProActiveRuntime
nodeName
- node on which the body is restartedckpt
- checkpoint to use for recoveryinc
- incarnation number of this recovery
ProActiveException
ProActiveRuntime.receiveCheckpoint(java.lang.String, org.objectweb.proactive.core.body.ft.checkpointing.Checkpoint, int)
public java.lang.String getVNName(java.lang.String Nodename) throws ProActiveException
getVNName
in interface ProActiveRuntime
ProActiveException
ProActiveRuntime.getVNName(java.lang.String)
public byte[] getClassDataFromThisRuntime(java.lang.String className) throws ProActiveException
ProActiveRuntime
getClassDataFromThisRuntime
in interface ProActiveRuntime
className
- name of the class
ProActiveException
ProActiveRuntime.getClassDataFromThisRuntime(java.lang.String)
public byte[] getClassDataFromParentRuntime(java.lang.String className) throws ProActiveException
ProActiveRuntime
getClassDataFromParentRuntime
in interface ProActiveRuntime
className
- name of the class
ProActiveException
ProActiveRuntime.getClassDataFromParentRuntime(java.lang.String)
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 getJobID()
getJobID
in interface Job
Job.getJobID()
public java.security.cert.X509Certificate getCertificate() throws SecurityNotAvailableException
SecurityEntity
getCertificate
in interface SecurityEntity
SecurityNotAvailableException
- if security is not availablepublic 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, RenegotiateSessionException
SecurityEntity
randomValue
in interface SecurityEntity
sessionID
- the session IDclientRandomValue
- client random value
RenegotiateSessionException
- if the session has expired
SecurityNotAvailableException
- if the security is not availablepublic byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey, byte[] myCertificate, byte[] signature) throws SecurityNotAvailableException, RenegotiateSessionException, KeyExchangeException
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
KeyExchangeException
- if a key data/length/algorithm is not supported
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 SecurityContext getPolicy(SecurityContext securityContext) throws SecurityNotAvailableException
SecurityEntity
getPolicy
in interface SecurityEntity
securityContext
- communication details allowing the entity to
look for a matching policy
SecurityNotAvailableException
- thrown the entity doest not support the securitypublic byte[] getCertificateEncoded() throws SecurityNotAvailableException
SecurityEntity
getCertificateEncoded
in interface SecurityEntity
SecurityNotAvailableException
public java.util.ArrayList getEntities() throws SecurityNotAvailableException
SecurityEntity
getEntities
in interface SecurityEntity
SecurityNotAvailableException
- if the target entity does not support securitypublic void terminateSession(long sessionID) throws SecurityNotAvailableException
SecurityEntity
terminateSession
in interface SecurityEntity
sessionID
-
SecurityNotAvailableException
- id security is not availablepublic 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 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |