Public Member Functions | |
void | runActivity (Body body) |
Runs the activity of the active object. |
An object implementing this interface is invoked to run the activity until an event trigger its end. The object being reified as an active object can directly implement this interface or an external class can also be used.
It is the role of the body of the active object to perform the call on the object implementing this interface. For an active object to run an activity, the method runActivity
must not end before the end of the activity. When the method runActivity
ends, the activity ends too and the endActivity
can be invoked.
Here is an example of a simple implementation of runActivity
method doing a FIFO service of the request queue :
public void runActivity(Body body) { Service service = new Service(body); while (body.isActive()) { service.blockingServeOldest(); } }
Definition at line 72 of file RunActive.java.
void org.objectweb.proactive.RunActive.runActivity | ( | Body | body | ) |
Runs the activity of the active object.
body | the body of the active object being started |
Implemented in org.objectweb.proactive.calcium.proactive.ActiveObjectSkernel< T >, org.objectweb.proactive.core.component.body.ComponentActivity, org.objectweb.proactive.core.component.collectiveitfs.GatherFuturesHandler, org.objectweb.proactive.p2p.loadbalancer.P2PLoadBalancer, org.objectweb.proactive.p2p.service.node.P2PNodeLookup, org.objectweb.proactive.p2p.service.P2PAcquaintanceManager, org.objectweb.proactive.p2p.service.P2PFirstContact, org.objectweb.proactive.scheduler.JobNoDescriptor, and org.objectweb.proactive.scheduler.policy.AbstractPolicy.
Referenced by org.objectweb.proactive.core.body.ActiveBody.run(), and org.objectweb.proactive.core.component.body.ComponentActivity.runActivity().