Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Method_Request Class Reference

Reifies a method into a request. Subclasses must provide the necessary state and behavior. More...

#include <Method_Request.h>

List of all members.

Public Methods

 ACE_Method_Request (unsigned long priority=0)
 Constructor. More...

virtual ~ACE_Method_Request (void)
 Destructor. More...

unsigned long priority (void) const
 Get priority. More...

void priority (unsigned long prio)
 Set priority. More...

virtual int call (void)=0
 Invoked by the scheduler to execute the request. More...


Protected Attributes

unsigned long priority_
 The priority of the request. More...


Private Methods

void operator= (const ACE_Method_Request &)
 ACE_Method_Request (const ACE_Method_Request &)


Detailed Description

Reifies a method into a request. Subclasses must provide the necessary state and behavior.

An ACE_Method_Request is inserted in an ACE_Activation_Queue, where it is subsequently removed by a scheduler object (often derived from ACE_Task), which invokes the call() method.

This class is discussed in depth in the Active Object chapter of POSA2.

See also:
ACE_Activation_Queue

Definition at line 43 of file Method_Request.h.


Constructor & Destructor Documentation

ACE_Method_Request::ACE_Method_Request unsigned long    priority = 0
 

Constructor.

Definition at line 8 of file Method_Request.cpp.

00009   : priority_ (prio)
00010 {
00011 }

ACE_Method_Request::~ACE_Method_Request void    [virtual]
 

Destructor.

Definition at line 13 of file Method_Request.cpp.

00014 {
00015 }

ACE_Method_Request::ACE_Method_Request const ACE_Method_Request &    [private]
 


Member Function Documentation

virtual int ACE_Method_Request::call void    [pure virtual]
 

Invoked by the scheduler to execute the request.

This method must be implemented by the subclass to perform the desired actions.

Returns:
int; not interpreted by ACE. The scheduler class must decide the meaning of this return value and act on it if needed.

void ACE_Method_Request::operator= const ACE_Method_Request &    [private]
 

void ACE_Method_Request::priority unsigned long    prio
 

Set priority.

Priority values are user-defined. The default (set in the constructor) is 0. The priority value is used in the ACE_Activation_Queue::enqueue() method to order the method requests in the queue by priority. 0 is the lowest priority.

Parameters:
prio  unsigned long, the new priority value for this object.
See also:
ACE_Activation_Queue::enqueue

Definition at line 24 of file Method_Request.cpp.

References priority_.

00025 {
00026   this->priority_ = prio;
00027 }

unsigned long ACE_Method_Request::priority void    const
 

Get priority.

Definition at line 18 of file Method_Request.cpp.

References priority_.

Referenced by ACE_Activation_Queue::enqueue.

00019 {
00020   return this->priority_;
00021 }


Member Data Documentation

unsigned long ACE_Method_Request::priority_ [protected]
 

The priority of the request.

Definition at line 84 of file Method_Request.h.

Referenced by priority.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:50:38 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002