|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ProActiveRuntime
offers a set of services needed by ProActive to work with
remote JVM. Each JVM that is aimed to hold active objects must contain
one and only one instance of the ProActiveRuntime
class. That instance, when
created, will register itself to some registry where it is possible to perform a lookup
(such as the RMI registry).
When ProActive needs to interact with a remote JVM, it will lookup for the ProActiveRuntime
associated
with that JVM (using typically the RMI Registry) and use the remote interface of the ProActiveRuntime
to perform the interaction.
Aside the getter giving information about the VM, the 3 services offered are :
createLocalNode
createVM
Field Summary | |
static org.apache.log4j.Logger |
runtimeLogger
|
Method Summary | |
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,
PolicyServer 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. |
void |
enableSecurityIfNeeded()
sets all needed modifications to enable security components MUST be called when the descriptor is ready |
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 |
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 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)
|
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)
|
void |
killAllNodes()
**Under development** Kills all Nodes in this ProActiveRuntime |
void |
killNode(java.lang.String nodeName)
**Under development** 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. |
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 |
setDefaultNodeVirtualNodeName(java.lang.String s)
|
void |
setProActiveSecurityManager(ProActiveSecurityManager ps)
|
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 interface org.objectweb.proactive.Job |
getJobID |
Field Detail |
public static final org.apache.log4j.Logger runtimeLogger
Method Detail |
public java.lang.String createLocalNode(java.lang.String nodeName, boolean replacePreviousBinding, PolicyServer policyServer, java.lang.String vnName, java.lang.String jobId) throws NodeException
nodeName
- the name of the node to create localyreplacePreviousBinding
-
NodeException
- if the new node cannot be createdpublic void killAllNodes() throws ProActiveException
ProActiveException
public void killNode(java.lang.String nodeName) throws ProActiveException
nodeName
- the name of the node to kill
ProActiveException
public void createVM(UniversalProcess remoteProcess) throws java.io.IOException, ProActiveException
remoteProcess
- the process that will originate the creation of the runtime
java.io.IOException
- if the new VM cannot be created
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic java.lang.String[] getLocalNodeNames() throws ProActiveException
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic VMInformation getVMInformation()
public void register(ProActiveRuntime proActiveRuntimeDist, java.lang.String proActiveRuntimeName, java.lang.String creatorID, java.lang.String creationProtocol, java.lang.String vmName)
proActiveRuntimeDist
- the remote ProactiveRuntime to registerproActiveRuntimeName
- the name of the remote ProActiveRuntimecreatorID
- the name of the creator of the remote ProActiveRuntimecreationProtocol
- the protocol used to register the remote ProActiveRuntime when createdpublic ProActiveRuntime[] getProActiveRuntimes() throws ProActiveException
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic ProActiveRuntime getProActiveRuntime(java.lang.String proActiveRuntimeName) throws ProActiveException
proActiveRuntimeName
- the name of the ProActiveruntime to return
ProActiveException
- if a problem occurs due to the remote nature of this ProActiveRuntimepublic void killRT(boolean softly) throws java.lang.Exception
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
ProActiveException
public java.util.ArrayList getActiveObjects(java.lang.String nodeName) throws ProActiveException
nodeName
- the name of the node
ProActiveException
public java.util.ArrayList getActiveObjects(java.lang.String nodeName, java.lang.String className) throws ProActiveException
nodeName
- the name of the node
ProActiveException
public VirtualNode getVirtualNode(java.lang.String virtualNodeName) throws ProActiveException
ProActiveException
public void registerVirtualNode(java.lang.String virtualNodeName, boolean replacePreviousBinding) throws ProActiveException
virtualNodeName
-
ProActiveException
public void unregisterVirtualNode(java.lang.String virtualNodeName) throws ProActiveException
virtualNodeName
- the virtualNode to unregister.
ProActiveException
- if a problem occurs when trying to unregister the virtualNodepublic void unregisterAllVirtualNodes() throws ProActiveException
ProActiveException
public java.lang.String getJobID(java.lang.String nodeUrl) throws ProActiveException
ProActiveException
public UniversalBody createBody(java.lang.String nodeName, ConstructorCall bodyConstructorCall, boolean isNodeLocal) throws ProActiveException, ConstructorCallExecutionFailedException, java.lang.reflect.InvocationTargetException
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.
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
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.
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 java.security.cert.X509Certificate getCreatorCertificate() throws ProActiveException
ProActiveException
public PolicyServer getPolicyServer() throws ProActiveException
ProActiveException
public void setProActiveSecurityManager(ProActiveSecurityManager ps) throws ProActiveException
ProActiveException
public java.lang.String getVNName(java.lang.String Nodename) throws ProActiveException
ProActiveException
public void setDefaultNodeVirtualNodeName(java.lang.String s) throws ProActiveException
ProActiveException
public void listVirtualNodes() throws ProActiveException
ProActiveException
public PolicyServer getNodePolicyServer(java.lang.String nodeName) throws ProActiveException
ProActiveException
public void enableSecurityIfNeeded() throws ProActiveException
ProActiveException
public java.security.cert.X509Certificate getNodeCertificate(java.lang.String nodeName) throws ProActiveException
nodeName
-
ProActiveException
public java.util.ArrayList getEntities(java.lang.String nodeName) throws ProActiveException
nodeName
-
ProActiveException
public java.util.ArrayList getEntities(UniversalBody uBody) throws ProActiveException
ProActiveException
public java.util.ArrayList getEntities() throws ProActiveException
ProActiveException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |