org.objectweb.proactive.RunActive Interface Reference

Inheritance diagram for org.objectweb.proactive.RunActive:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.proactive.RunActive:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void runActivity (Body body)
 Runs the activity of the active object.

Detailed Description

RunActive is related to the activity of an active object. When an active object is started, which means that its active thread starts and serves the requests being sent to its request queue, it is possible to define exactly how the activity (the serving of requests amongst others) will be done.

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();
   }
 }
 

Author:
ProActive Team
Version:
1.0, 2002/06
Since:
ProActive 0.9.3

Definition at line 72 of file RunActive.java.


Member Function Documentation

void org.objectweb.proactive.RunActive.runActivity ( Body  body  ) 

Runs the activity of the active object.

Parameters:
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().


The documentation for this interface was generated from the following file:
Generated on Mon Jan 22 15:16:13 2007 for ProActive by  doxygen 1.5.1