org.objectweb.proactive.p2p.api.worker
Class Worker
java.lang.Object
org.objectweb.proactive.p2p.api.worker.Worker
- All Implemented Interfaces:
- Active, InitActive, java.io.Serializable
- public class Worker
- extends java.lang.Object
- implements java.io.Serializable, InitActive
- Author:
- Alexandre di Costanzo
- See Also:
- Serialized Form
Field Summary |
protected static org.apache.log4j.Logger |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static org.apache.log4j.Logger logger
Worker
public Worker()
Worker
public Worker(Worker mother)
execute
public Result execute(java.lang.Object[] params)
getPeers
public int getPeers(int n)
throws ProActiveException
- Throws:
ProActiveException
relaxPeers
public void relaxPeers()
createDaughter
public void createDaughter(java.lang.Object[][] params)
throws ProActiveException
- Parameters:
params
- [][0] = Woker mother ; [][1]=Problem
- Throws:
ProActiveException
executeDaughter
public Result executeDaughter(java.lang.Object[] params)
- Parameters:
params
-
- Returns:
- Returns result
sendInfoToAll
public void sendInfoToAll(java.lang.Object info)
sendInfoToBrother
public void sendInfoToBrother(java.lang.Object info)
sendInfoToMother
public void sendInfoToMother(java.lang.Object info)
receiveInfo
public void receiveInfo(java.lang.Object info)
receiveInfoForAll
public void receiveInfoForAll(java.lang.Object info,
boolean fromMother)
getMother
public Worker getMother()
getDaughters
public Worker getDaughters()
getBrothers
public Worker getBrothers()
getInfos
public java.util.Vector getInfos()
- Returns:
- Returns the infos.
lastInfo
public java.lang.Object lastInfo()
throws java.util.NoSuchElementException
- Throws:
java.util.NoSuchElementException
haveNewInfo
public int haveNewInfo()
getProblem
public Problem getProblem()
- Returns:
- Returns the problem.
setBrothers
public void setBrothers(Worker brothers)
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)
setProblem
public void setProblem(Problem problem)
- Parameters:
problem
- The problem to set.
Copyright ? April 2005 INRIA All Rights Reserved.