blob: 5b9ab460f0e00d9c703008e634b4d174c3d8e710 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = LIBRARY
// ace
//
// = FILENAME
// Method_Request.h
//
// = AUTHOR
// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt
// <schmidt@cs.wustl.edu>
//
// ============================================================================
#ifndef ACE_METHOD_REQUEST_H
#define ACE_METHOD_REQUEST_H
#include "ace/OS.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class ACE_Export ACE_Method_Request
{
// = TITLE
// Reifies a method into a request. Subclasses provide
// the necessary state and behavior.
//
// = DESCRIPTION
// A <Method_Request> is inserted in the <Activation_Queue>,
// where it is subsequently removed by a <Scheduler>, which
// invokes the <call> method.
public:
// = Initialization and termination methods.
ACE_Method_Request (u_long priority = 0);
// Constructor.
virtual ~ACE_Method_Request (void);
// Destructor.
// = Accessors.
u_long priority (void);
// Get priority.
void priority (u_long);
// Set priority.
// = Invocation method (must be overridden by subclasses).
virtual int call (void) = 0;
// Invoked when the <Method_Request> is scheduled to run.
protected:
u_long priority_;
// The priority of the request.
};
#endif /* ACE_METHOD_REQUEST_H */
|