summaryrefslogtreecommitdiff
path: root/TAO/tao/CSD_Framework/CSD_POA.h
blob: 7bf2c338e0d17eff3e0cea743a2300b917097342 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// -*- C++ -*-

//=============================================================================
/**
 *  @file CSD_POA.h
 *
 *  $Id$
 *
 *  @author Yan Dai (dai_y@ociweb.com)
 */
//=============================================================================

#ifndef TAO_CSD_POA_H
#define TAO_CSD_POA_H

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

#include "tao/CSD_Framework/CSD_FW_Export.h"

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

#include "tao/PortableServer/Regular_POA.h"
#include "tao/CSD_Framework/CSD_Strategy_Proxy.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

/**
 * @class TAO_CSD_POA
 *
 * @brief Implementation of the CSD_Framework::POA interface.
 *
 * Implementation of the CSD_Framework::POA interface.
 */
class TAO_CSD_FW_Export TAO_CSD_POA 
  : public virtual CSD_Framework::POA, 
    public virtual TAO_Regular_POA
{
public:
  //Constructor 
  TAO_CSD_POA (const String &name,
              TAO_POA_Manager &poa_manager,
              const TAO_POA_Policy_Set &policies,
              TAO_Root_POA *parent,
              ACE_Lock &lock,
              TAO_SYNCH_MUTEX &thread_lock,
              TAO_ORB_Core &orb_core,
              TAO_Object_Adapter *object_adapter
              ACE_ENV_ARG_DECL);
  
  //Destructor 
  virtual ~TAO_CSD_POA (void);
  
  /// Pass the Strategy object reference to the CSD poa.
  virtual
  void set_csd_strategy (
      ::CSD_Framework::Strategy_ptr s
      ACE_ENV_ARG_DECL
    )
    ACE_THROW_SPEC ((
      CORBA::SystemException
    ));

  /// Hook - The POA has been (or is being) activated.
  virtual void poa_activated_hook ();

  /// Hook - The POA has been deactivated.
  virtual void poa_deactivated_hook ();

  /// Hook - A servant has been activated.
  virtual void servant_activated_hook (PortableServer::Servant servant, 
                              const PortableServer::ObjectId& oid
                              ACE_ENV_ARG_DECL);

  /// Hook - A servant has been deactivated.
  virtual void servant_deactivated_hook (PortableServer::Servant servant, 
                                const PortableServer::ObjectId& oid
                                ACE_ENV_ARG_DECL);

  ///Method for creating new CSD POA.
  TAO_Root_POA * new_POA (const String &name,
                          TAO_POA_Manager &poa_manager,
                          const TAO_POA_Policy_Set &policies,
                          TAO_Root_POA *parent,
                          ACE_Lock &lock,
                          TAO_SYNCH_MUTEX &thread_lock,
                          TAO_ORB_Core &orb_core,
                          TAO_Object_Adapter *object_adapter
                          ACE_ENV_ARG_DECL);

  /// Servant Dispatching Strategy proxy accessor.
  TAO::CSD::Strategy_Proxy& 
    servant_dispatching_strategy_proxy (void) const;

private:

  TAO::CSD::Strategy_Proxy* sds_proxy_;
};

TAO_END_VERSIONED_NAMESPACE_DECL


#if defined (__ACE_INLINE__)
# include "tao/CSD_Framework/CSD_POA.inl"
#endif /* __ACE_INLINE__ */

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

#endif /* TAO_CSD_POA_H  */