org.objectweb.proactive.p2p.service.node
Class P2PNodeManager

java.lang.Object
  extended by org.objectweb.proactive.p2p.service.node.P2PNodeManager
All Implemented Interfaces:
java.io.Serializable, Active, EndActive, InitActive, P2PConstants, ProActiveInternalObject

public class P2PNodeManager
extends java.lang.Object
implements java.io.Serializable, InitActive, EndActive, P2PConstants, ProActiveInternalObject

Author:
Alexandre di Costanzo Created on Jan 12, 2005
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.objectweb.proactive.p2p.service.util.P2PConstants
HIDE_P2PNODE_MONITORING, MAX_NODE, P2P_NODE_NAME, PROPERPY_XML_PATH, PROPERTY_ACQUISITION, PROPERTY_EXPLORING_MSG, PROPERTY_LOOKUP_FREQ, PROPERTY_MSG_MEMORY, PROPERTY_MULTI_PROC_NODES, PROPERTY_NO_SHARING, PROPERTY_NOA, PROPERTY_NODES_ACQUISITION_T0, PROPERTY_PORT, PROPERTY_TTL, PROPERTY_TTU, SHARED_NODE_NAME, VN_NAME
 
Constructor Summary
P2PNodeManager()
          Empty constructor for new active.
 
Method Summary
 java.util.Vector<Node> askingAllNodes(java.lang.String nodeFamilyRegexp)
           
 P2PNode askingNode(boolean evenIfItIsShared)
           
 P2PNode askingNode(java.lang.String nodeFamilyRegexp)
          Asking a shared node.
 void endActivity(Body body)
          Finalized the active object after the activity has been stopped.
 void initActivity(Body body)
          Initializes the activity of the active object.
 void leaveNode(Node nodeToFree, java.lang.String vnName)
          Leave the specified node.
 void noMoreNodeNeeded(Node givenNode)
          Free a booked node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P2PNodeManager

public P2PNodeManager()
Empty constructor for new active.

Method Detail

askingNode

public P2PNode askingNode(java.lang.String nodeFamilyRegexp)
Asking a shared node.

Returns:
a P2PNode which contains a node or null if no shared nodes are available.

askingAllNodes

public java.util.Vector<Node> askingAllNodes(java.lang.String nodeFamilyRegexp)

askingNode

public P2PNode askingNode(boolean evenIfItIsShared)

leaveNode

public void leaveNode(Node nodeToFree,
                      java.lang.String vnName)
Leave the specified node. The node is killed and new one is created and ready for sharing.

Parameters:
nodeToFree - the node to kill.
vnName - Virtual node name to unregister or null.

noMoreNodeNeeded

public void noMoreNodeNeeded(Node givenNode)
Free a booked node.

Parameters:
givenNode - node given and not used.

initActivity

public void initActivity(Body body)
Description copied from interface: InitActive
Initializes the activity of the active object.

Specified by:
initActivity in interface InitActive
Parameters:
body - the body of the active object being initialized
See Also:
InitActive.initActivity(org.objectweb.proactive.Body)

endActivity

public void endActivity(Body body)
Description copied from interface: EndActive
Finalized the active object after the activity has been stopped.

Specified by:
endActivity in interface EndActive
Parameters:
body - the body of the active object being finalized.
See Also:
EndActive.endActivity(org.objectweb.proactive.Body)


Copyright 2001-2007 INRIA All Rights Reserved.