summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Notify_Command.h
blob: d14b4ea5a668b3c26b596b98df7b466a38ee6828 (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
62
63
64
65
66
67
68
69
/* -*- C++ -*- */
// $Id$
//
// ============================================================================
//
// = LIBRARY
//   ORBSVCS Notification
//
// = FILENAME
//   Notify_Command.h
//
// = DESCRIPTION
//   Command Object base class used by Notify's Worker Task objects.
//
// = AUTHOR
//   Pradeep Gore <pradeep@cs.wustl.edu>
//
// ============================================================================

#ifndef TAO_NOTIFY_COMMAND_H
#define TAO_NOTIFY_COMMAND_H

#include "ace/pre.h"
#include "ace/Message_Block.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/corba.h"
#include "notify_export.h"

class TAO_Notify_Event_Processor;
class TAO_Notify_Event;

class TAO_Notify_Export TAO_Notify_Command : public ACE_Message_Block
{
  // = TITLE
  //   TAO_Notify_Command
  //
  // = DESCRIPTION
  //   Base class for Command Objects.
  //   Command objects are executed by the Notify_Worker_Task.
  //
 public:
  TAO_Notify_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event);
  ~TAO_Notify_Command ();

  virtual int execute (CORBA::Environment& ACE_TRY_ENV) = 0;
  // Command callback

protected:
  // = Data Members
  TAO_Notify_Event_Processor* event_processor_;
  // The command objects should notify the event processor once they have successfully
  // executed commands.

  TAO_Notify_Event* event_;
  // The event that we "execute" this command on.
};


#if defined (__ACE_INLINE__)
#include "Notify_Command.i"
#endif /* __ACE_INLINE__ */

#include "ace/post.h"

#endif /* TAO_NOTIFY_COMMAND_H */