Scopira 20080306

scopira::agent::agent_task_i Class Reference

#include <task.h>

Inheritance diagram for scopira::agent::agent_task_i:

List of all members.

Public Types

enum  {
  run_done_c = 0, run_again_0_c = 0x1, run_again_1_c = 0x2, run_again_10_c = 0x3,
  run_again_100_c = 0x4, run_canmove_c = 0x100, run_onmsg_c = 0x200

Public Member Functions

virtual int run (scopira::agent::task_context &ctx)=0

Detailed Description

A simple task that once started, does no communication with other tasks.

Basically, the creator instantiates an instance, populates any member variables, and then hands it off to the launch() method.

Because these tasks don't do any communication, they may also be checkedpointed and recoverable. That is, they may be restarted at the last saved state if a running process is lost on a dead machine.

Aleksander Demko

Member Function Documentation

virtual int scopira::agent::agent_task_i::run ( scopira::agent::task_context ctx) [pure virtual]

The run method for the task.

The implementation should do some work and return. It should return false if there is no more work to do (ie. return true if the run method should be run again).

You should try to return once in awhile through the executation of your task, as scopira can only move tasks between run calls.

Aleksander Demko

The documentation for this class was generated from the following file: