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 Member Functions

 ACE_Method_Request (unsigned long priority=0)
 Constructor.
virtual ~ACE_Method_Request (void)
 Destructor.
unsigned long priority (void) const
 Get priority.
void priority (unsigned long prio)
 Set priority.
virtual int call (void)=0
 Invoked by the scheduler to execute the request.

Protected Attributes

unsigned long priority_
 The priority of the request.

Private Member Functions

 ACE_Method_Request (const ACE_Method_Request &)
 Disallow copying and assignment.
void operator= (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

Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Method_Request::ACE_Method_Request ( unsigned long  priority = 0  ) 

Constructor.

ACE_Method_Request::~ACE_Method_Request ( void   )  [virtual]

Destructor.

ACE_Method_Request::ACE_Method_Request ( const ACE_Method_Request  )  [private]

Disallow copying and assignment.


Member Function Documentation

unsigned long ACE_Method_Request::priority ( void   )  const

Get priority.

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

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]


Member Data Documentation

unsigned long ACE_Method_Request::priority_ [protected]

The priority of the request.


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

Generated on Wed Apr 23 02:40:07 2008 for ACE by  doxygen 1.5.5