|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.runtime.jini.JiniRuntimeAdapter
An adapter for a JiniRuntime to be able to receive remote calls. This helps isolate JINI-specific code into a small set of specific classes, thus enabling reuse if we one day decide to switch to another remote objects library.
Field Summary | |
protected JiniRuntime |
jiniRuntime
|
protected java.lang.String |
proActiveRuntimeURL
|
protected VMInformation |
vmInformation
|
Fields inherited from interface org.objectweb.proactive.core.runtime.ProActiveRuntime |
runtimeLogger |
Constructor Summary | |
protected |
JiniRuntimeAdapter()
|
|
JiniRuntimeAdapter(JiniRuntime r)
|
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. |
protected JiniRuntime |
createJiniRuntime()
|
java.lang.String |
createLocalNode(java.lang.String nodeName,
boolean replacePreviousBinding,
PolicyServer ps,
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. |
void |
enableSecurityIfNeeded()
sets all needed modifications to enable security components MUST be called when the descriptor is ready |
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 objectName)
Returns all Active Objects with the specified class name, deployed on the node with the given name on this ProActiveRuntime |
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. |
java.security.cert.X509Certificate |
getCreatorCertificate()
|
java.util.ArrayList |
getEntities()
|
java.util.ArrayList |
getEntities(java.lang.String nodeName)
|
java.util.ArrayList |
getEntities(UniversalBody uBody)
|
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 |
java.security.cert.X509Certificate |
getNodeCertificate(java.lang.String nodeName)
|
PolicyServer |
getNodePolicyServer(java.lang.String nodeName)
|
SecurityContext |
getPolicy(SecurityContext sc)
|
PolicyServer |
getPolicyServer()
|
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 |
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 |
listVirtualNodes()
|
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 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 |
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** . |
void |
setDefaultNodeVirtualNodeName(java.lang.String s)
|
void |
setParent(java.lang.String fatherRuntimeName)
This method adds a reference to the runtime that created this runtime. |
void |
setProActiveSecurityManager(ProActiveSecurityManager ps)
|
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 JiniRuntime jiniRuntime
protected VMInformation vmInformation
protected java.lang.String proActiveRuntimeURL
Constructor Detail |
protected JiniRuntimeAdapter() throws ProActiveException
public JiniRuntimeAdapter(JiniRuntime r) throws ProActiveException
Method Detail |
public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String createLocalNode(java.lang.String nodeName, boolean replacePreviousBinding, PolicyServer ps, 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 createdpublic void killAllNodes() throws ProActiveException
ProActiveRuntime
killAllNodes
in interface ProActiveRuntime
ProActiveException
public void killNode(java.lang.String nodeName) throws ProActiveException
ProActiveRuntime
killNode
in interface ProActiveRuntime
nodeName
- the name of the node to kill
ProActiveException
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
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntime
java.io.IOException
- if the new VM cannot be createdpublic java.lang.String[] getLocalNodeNames() throws ProActiveException
ProActiveRuntime
getLocalNodeNames
in interface ProActiveRuntime
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic VMInformation getVMInformation()
ProActiveRuntime
getVMInformation
in interface ProActiveRuntime
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 createdpublic 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() throws ProActiveException
ProActiveRuntime
getProActiveRuntimes
in interface ProActiveRuntime
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName) throws ProActiveException
ProActiveRuntime
getProActiveRuntime
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the ProActiveruntime to return
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic void addAcquaintance(java.lang.String proActiveRuntimeName)
ProActiveRuntime
addAcquaintance
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the remote ProActiveRuntime in which this runtime is registeredpublic java.lang.String[] getAcquaintances()
ProActiveRuntime
getAcquaintances
in interface ProActiveRuntime
public void rmAcquaintance(java.lang.String proActiveRuntimeName)
ProActiveRuntime
proActiveRuntimeName
.
rmAcquaintance
in interface ProActiveRuntime
proActiveRuntimeName
- the name of the remote ProActiveRuntime.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
public java.lang.String getURL() throws ProActiveException
ProActiveRuntime
getURL
in interface ProActiveRuntime
ProActiveException
public java.util.ArrayList getActiveObjects(java.lang.String nodeName) throws ProActiveException
ProActiveRuntime
getActiveObjects
in interface ProActiveRuntime
nodeName
- the name of the node
ProActiveException
public java.util.ArrayList getActiveObjects(java.lang.String nodeName, java.lang.String objectName) throws ProActiveException
ProActiveRuntime
getActiveObjects
in interface ProActiveRuntime
nodeName
- the name of the nodeobjectName
- class of the Active Objects to look for
ProActiveException
public VirtualNode getVirtualNode(java.lang.String virtualNodeName) throws ProActiveException
ProActiveRuntime
getVirtualNode
in interface ProActiveRuntime
virtualNodeName
- the name of the VirtualNode to be acquired
ProActiveException
public void registerVirtualNode(java.lang.String virtualNodeName, boolean replacePreviousBinding) throws ProActiveException
ProActiveRuntime
registerVirtualNode
in interface ProActiveRuntime
virtualNodeName
-
ProActiveException
public void unregisterVirtualNode(java.lang.String virtualNodeName) throws ProActiveException
ProActiveRuntime
unregisterVirtualNode
in interface ProActiveRuntime
virtualNodeName
- the virtualNode to unregister.
ProActiveException
- if a problem occurs when trying to unregister the virtualNodepublic void unregisterAllVirtualNodes() throws ProActiveException
ProActiveRuntime
unregisterAllVirtualNodes
in interface ProActiveRuntime
ProActiveException
public UniversalBody createBody(java.lang.String nodeName, ConstructorCall bodyConstructorCall, boolean isNodeLocal) throws ProActiveException, 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 bodyisNodeLocal
- boolean. True if proxy and body are on the same vm, false otherwise
ProActiveException
- if a problem occurs due to the remote nature of this ProactiveRuntime
ConstructorCallExecutionFailedException
- if the constructor call cannot be executed
java.lang.reflect.InvocationTargetException
- if the java constructor execution failedpublic 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
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic 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
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic java.security.cert.X509Certificate getCreatorCertificate() throws ProActiveException
getCreatorCertificate
in interface ProActiveRuntime
ProActiveException
public PolicyServer getPolicyServer() throws ProActiveException
getPolicyServer
in interface ProActiveRuntime
ProActiveException
public java.lang.String getVNName(java.lang.String Nodename) throws ProActiveException
getVNName
in interface ProActiveRuntime
ProActiveException
public void setProActiveSecurityManager(ProActiveSecurityManager ps) throws ProActiveException
setProActiveSecurityManager
in interface ProActiveRuntime
ProActiveException
public void setDefaultNodeVirtualNodeName(java.lang.String s) throws ProActiveException
setDefaultNodeVirtualNodeName
in interface ProActiveRuntime
ProActiveException
public void listVirtualNodes() throws ProActiveException
ProActiveException
public PolicyServer getNodePolicyServer(java.lang.String nodeName) throws ProActiveException
getNodePolicyServer
in interface ProActiveRuntime
ProActiveException
public void enableSecurityIfNeeded() throws ProActiveException
ProActiveRuntime
enableSecurityIfNeeded
in interface ProActiveRuntime
ProActiveException
public java.security.cert.X509Certificate getNodeCertificate(java.lang.String nodeName) throws ProActiveException
getNodeCertificate
in interface ProActiveRuntime
nodeName
-
ProActiveException
public java.util.ArrayList getEntities(java.lang.String nodeName) throws ProActiveException
getEntities
in interface ProActiveRuntime
nodeName
-
ProActiveException
public java.util.ArrayList getEntities(UniversalBody uBody) throws ProActiveException
getEntities
in interface ProActiveRuntime
uBody
-
ProActiveException
public java.util.ArrayList getEntities() throws ProActiveException
getEntities
in interface ProActiveRuntime
ProActiveException
public SecurityContext getPolicy(SecurityContext sc) throws ProActiveException, SecurityNotAvailableException
getPolicy
in interface ProActiveRuntime
sc
-
ProActiveException
SecurityNotAvailableException
public java.lang.String getJobID()
getJobID
in interface Job
Job.getJobID()
public java.lang.String getJobID(java.lang.String nodeUrl) throws ProActiveException
getJobID
in interface ProActiveRuntime
nodeUrl
-
ProActiveException
ProActiveRuntime.getJobID(java.lang.String)
public byte[] getClassDataFromParentRuntime(java.lang.String className) throws ProActiveException
ProActiveRuntime
getClassDataFromParentRuntime
in interface ProActiveRuntime
className
- name of the class
ProActiveException
public byte[] getClassDataFromThisRuntime(java.lang.String className) throws ProActiveException
ProActiveRuntime
getClassDataFromThisRuntime
in interface ProActiveRuntime
className
- name of the class
ProActiveException
public void setParent(java.lang.String fatherRuntimeName) throws ProActiveException
ProActiveRuntime
setParent
in interface ProActiveRuntime
fatherRuntimeName
- the name of the creator of this runtime
ProActiveException
protected JiniRuntime createJiniRuntime() throws java.rmi.RemoteException
java.rmi.RemoteException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |