summaryrefslogtreecommitdiff
path: root/TAO/tao/CSD_ThreadPool/CSD_TP_Custom_Request.h
blob: e4d89f40e15718da52290dab9244480cff3aaad2 (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
70
71
72
73
74
75
76
77
78
// This may look like C, but it's really -*- C++ -*-

//=============================================================================
/**
 *  @file    CSD_TP_Custom_Request.h
 *
 *  $Id$
 *
 *  @author  Tim Bradley <bradley_t@ociweb.com>
 */
//=============================================================================

#ifndef TAO_CSD_TP_CUSTOM_REQUEST_H
#define TAO_CSD_TP_CUSTOM_REQUEST_H

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

#include "CSD_TP_Export.h"

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

#include "CSD_TP_Request.h"
#include "CSD_TP_Custom_Request_Operation.h"
#include "tao/PortableServer/Servant_Base.h"


namespace TAO
{
  namespace CSD
  {

    class TP_Custom_Request;
    typedef TAO_Intrusive_Ref_Count_Handle<TP_Custom_Request>
                                             TP_Custom_Request_Handle;

    /**
     * @class TP_Custom_Request
     *
     * @brief Base class for "queue-able" Custom (non-CORBA) requests.
     *
     * TBD - Add description
     *
     */
    class TAO_CSD_TP_Export TP_Custom_Request : public TP_Request
    {
    public:

      /// Virtual Destructor.
      virtual ~TP_Custom_Request();


    protected:

      /// Constructor.
      TP_Custom_Request(TP_Custom_Request_Operation* op,
                        TP_Servant_State*            servant_state);

      void execute_op();
      void cancel_op();


    private:

      TP_Custom_Request_Operation_Handle op_;
    };

  }
}

#if defined (__ACE_INLINE__)
# include "CSD_TP_Custom_Request.inl"
#endif /* __ACE_INLINE__ */

#include /**/ "ace/post.h"

#endif /* TAO_CSD_TP_CUSTOM_REQUEST_H */