org.objectweb.proactive.core.descriptor.services
Class P2PDescriptorService

java.lang.Object
  extended byorg.objectweb.proactive.core.descriptor.services.P2PDescriptorService
All Implemented Interfaces:
P2PConstants, java.io.Serializable, UniversalService

public class P2PDescriptorService
extends java.lang.Object
implements UniversalService, P2PConstants

This class represents a service to acquire ProActiveRuntime(JVMs) with the ProActive P2P infrastructure This service can be defined and used transparently when using XML Deployment descriptor

Since:
ProActive 2.0.1
Version:
1.0, 2004/09/20
Author:
ProActive Team
See Also:
Serialized Form

Field Summary
protected  int askedNodes
           
protected static java.lang.String serviceName
           
protected  P2PService serviceP2P
           
 
Fields inherited from interface org.objectweb.proactive.p2p.service.util.P2PConstants
MAX_NODE, P2P_NODE_NAME, PROPERPY_XML_PATH, PROPERTY_ACQUISITION, PROPERTY_BOOKING_MAX, PROPERTY_BOOKING_NODES, PROPERTY_EXPLORING_MSG, PROPERTY_LOOKUP_FREQ, PROPERTY_MSG_MEMORY, PROPERTY_MULTI_PROC_NODES, PROPERTY_NOA, PROPERTY_NODES_ACQUISITION_T0, PROPERTY_PORT, PROPERTY_TTL, PROPERTY_TTU, SHARED_NODE_NAME, VN_NAME
 
Constructor Summary
P2PDescriptorService()
           
 
Method Summary
 int getMAX()
           
 int getNodeNumber()
           
 P2PService getP2PService()
           
 java.lang.String getServiceName()
          Returns the name of the service.
 void setAcq(java.lang.String acq)
          Specify P2P service acquisition method, as such rmi, http, etc.
 void setBookingNodes(java.lang.String booking_nodes)
          With Xml Deployment, book all nodes.
 void setMultiProcNodes(java.lang.String multi_proc_nodes)
          Sharing 1 node /cpu or only 1 node.
 void setNoa(java.lang.String noa)
          Specify NOA parameter for the P2P service.
 void setNodeNumber(int nodeNumber)
          Sets the number of nodes to be acquired with this P2P service
 void setNodeNumberToMAX()
          Sets the number of nodes to be acquired to 10000(Max Value) This method is usefull to acquire an undefined number of nodes.
 void setPeerList(java.lang.String[] peerList)
           
 void setPort(java.lang.String port)
          Specify which port the P2P service will listen.
 void setTtl(java.lang.String ttl)
          Specify TTL parameter for the P2P service.
 void setTtu(java.lang.String ttu)
          Specify TTU parameter for the P2P service.
 void setXmlPath(java.lang.String xml_path)
          For sharing nodes which are deployed from xml.
 ProActiveRuntime[] startService()
          Starts this Service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceName

protected static java.lang.String serviceName

askedNodes

protected int askedNodes

serviceP2P

protected P2PService serviceP2P
Constructor Detail

P2PDescriptorService

public P2PDescriptorService()
Method Detail

startService

public ProActiveRuntime[] startService()
                                throws ProActiveException
Description copied from interface: UniversalService
Starts this Service

Specified by:
startService in interface UniversalService
Returns:
an array of ProActiveRuntime
Throws:
ProActiveException
See Also:
UniversalService.startService()

getNodeNumber

public int getNodeNumber()
Returns:
Returns the askedNodes.

setNodeNumber

public void setNodeNumber(int nodeNumber)
Sets the number of nodes to be acquired with this P2P service

Parameters:
nodeNumber - The askedNodes to set.

setNodeNumberToMAX

public void setNodeNumberToMAX()
Sets the number of nodes to be acquired to 10000(Max Value) This method is usefull to acquire an undefined number of nodes. Indeed the number of nodes expected is never reached, the operation will be done again after lookupFrequence ms and if the timout has not expired


getServiceName

public java.lang.String getServiceName()
Description copied from interface: UniversalService
Returns the name of the service. The name is static, it means that it is the same name for all instances of a sefvice's class

Specified by:
getServiceName in interface UniversalService
Returns:
the static name of the service
See Also:
UniversalService.getServiceName()

setAcq

public void setAcq(java.lang.String acq)
Specify P2P service acquisition method, as such rmi, http, etc.

Parameters:
acq - the acquisition method.

setPort

public void setPort(java.lang.String port)
Specify which port the P2P service will listen.

Parameters:
port - the listening port.

setNoa

public void setNoa(java.lang.String noa)
Specify NOA parameter for the P2P service.

Parameters:
noa - Number Of Acquaintances.

setTtu

public void setTtu(java.lang.String ttu)
Specify TTU parameter for the P2P service.

Parameters:
ttu - Time To Update.

setTtl

public void setTtl(java.lang.String ttl)
Specify TTL parameter for the P2P service.

Parameters:
ttl - Time To Live.

setMultiProcNodes

public void setMultiProcNodes(java.lang.String multi_proc_nodes)
Sharing 1 node /cpu or only 1 node.

Parameters:
multi_proc_nodes - true or flase.

setXmlPath

public void setXmlPath(java.lang.String xml_path)
For sharing nodes which are deployed from xml.

Parameters:
xml_path - the file path.

setBookingNodes

public void setBookingNodes(java.lang.String booking_nodes)
With Xml Deployment, book all nodes.

Parameters:
booking_nodes - a boolean.

setPeerList

public void setPeerList(java.lang.String[] peerList)
Parameters:
peerList -

getMAX

public int getMAX()
Returns:
MAX_NODE P2P constant.

getP2PService

public P2PService getP2PService()
Returns:
the associated P2P service.


Copyright ? April 2005 INRIA All Rights Reserved.