org.objectweb.proactive.core.node
Class NodeImpl

java.lang.Object
  extended byorg.objectweb.proactive.core.node.NodeImpl
All Implemented Interfaces:
Node, java.io.Serializable

public class NodeImpl
extends java.lang.Object
implements Node, java.io.Serializable

A Node offers a set of services needed by ProActive to work with remote JVM. Each JVM that is aimed to hold active objects should contains at least one instance of the node class. That instance, when created, will be registered 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 one node associated with that JVM (using typically the RMI Registry) and use this node to perform the interaction.

We expect several concrete implementations of the Node to be wrtten such as a RMI node, a JINI node ...

Since:
ProActive 0.9
Version:
1.1, 2002/08/28
Author:
ProActive Team
See Also:
Serialized Form

Nested Class Summary
protected  class NodeImpl.NodeInformationImpl
           
 
Field Summary
protected  NodeInformation nodeInformation
           
protected  ProActiveRuntime proActiveRuntime
           
protected  java.lang.String vnName
           
 
Constructor Summary
NodeImpl()
           
NodeImpl(ProActiveRuntime proActiveRuntime, java.lang.String nodeURL, java.lang.String protocol, java.lang.String jobID)
           
 
Method Summary
 java.lang.Object[] getActiveObjects()
          Returns all activeObjects deployed on this Node
 java.lang.Object[] getActiveObjects(java.lang.String className)
          Returns all activeObjects with the given name deployed on this Node or null if such objects do not exist
 NodeInformation getNodeInformation()
          Returns the node information as one object.
 int getNumberOfActiveObjects()
           
 ProActiveRuntime getProActiveRuntime()
          Returns a reference to the ProActiveRuntime where the node has been created
 java.lang.String getVnName()
          Returns the name of the VirtualNode this Node belongs to
 void killAllActiveObjects()
          Terminate body of all node's active objects.
 void setVnName(java.lang.String string)
          Sets the name of the VirtualNode this Node belongs to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeInformation

protected NodeInformation nodeInformation

proActiveRuntime

protected ProActiveRuntime proActiveRuntime

vnName

protected java.lang.String vnName
Constructor Detail

NodeImpl

public NodeImpl()

NodeImpl

public NodeImpl(ProActiveRuntime proActiveRuntime,
                java.lang.String nodeURL,
                java.lang.String protocol,
                java.lang.String jobID)
Method Detail

getNodeInformation

public NodeInformation getNodeInformation()
Description copied from interface: Node
Returns the node information as one object. This method allows to retrieve all node information in one call to optimize performance.

Specified by:
getNodeInformation in interface Node
Returns:
the node information as one object
See Also:
Node.getNodeInformation()

getProActiveRuntime

public ProActiveRuntime getProActiveRuntime()
Description copied from interface: Node
Returns a reference to the ProActiveRuntime where the node has been created

Specified by:
getProActiveRuntime in interface Node
Returns:
ProActiveRuntime. The reference to the ProActiveRuntime where the node has been created
See Also:
Node.getProActiveRuntime()

getActiveObjects

public java.lang.Object[] getActiveObjects()
                                    throws NodeException,
                                           ActiveObjectCreationException
Description copied from interface: Node
Returns all activeObjects deployed on this Node

Specified by:
getActiveObjects in interface Node
Returns:
Object[] contains all activeObjects deployed on this Node
Throws:
NodeException
ActiveObjectCreationException
See Also:
Node.getActiveObjects()

getNumberOfActiveObjects

public int getNumberOfActiveObjects()
                             throws NodeException
Specified by:
getNumberOfActiveObjects in interface Node
Returns:
The number of active objects deployed in this Node.
Throws:
NodeException - Cannot get Active Objects registered on this node.
See Also:
Node.getNumberOfActiveObjects()

getActiveObjects

public java.lang.Object[] getActiveObjects(java.lang.String className)
                                    throws NodeException,
                                           ActiveObjectCreationException
Description copied from interface: Node
Returns all activeObjects with the given name deployed on this Node or null if such objects do not exist

Specified by:
getActiveObjects in interface Node
Parameters:
className - the class of the Active Objects
Returns:
Object[].The set of activeObjects deployed on this node of the given class
Throws:
NodeException
ActiveObjectCreationException
See Also:
Node.getActiveObjects(String)

getVnName

public java.lang.String getVnName()
Description copied from interface: Node
Returns the name of the VirtualNode this Node belongs to

Specified by:
getVnName in interface Node
Returns:
the name of the VirtualNode this Node belongs to
See Also:
Node.getVnName()

setVnName

public void setVnName(java.lang.String string)
Description copied from interface: Node
Sets the name of the VirtualNode this Node belongs to

Specified by:
setVnName in interface Node
Parameters:
string -
See Also:
Node.setVnName(String)

killAllActiveObjects

public void killAllActiveObjects()
                          throws NodeException,
                                 java.io.IOException
Description copied from interface: Node
Terminate body of all node's active objects.

Specified by:
killAllActiveObjects in interface Node
Throws:
java.io.IOException
NodeException
See Also:
Node.killAllActiveObjects()


Copyright ? April 2005 INRIA All Rights Reserved.