summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Log/LogActivator.h
blob: d39364a5661387ef33b5b6256e4eda909ba1497e (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
// -*- C++ -*-

//=============================================================================
/**
 *  @file   LogActivator.h
 *
 *  $Id$
 *
 */
//=============================================================================

#ifndef TAO_TLS_LOGACTIVATOR_H
#define TAO_TLS_LOGACTIVATOR_H

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

#include "orbsvcs/DsLogAdminC.h"

#if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)

#include "orbsvcs/Log/log_serv_export.h"

#include "tao/PortableServer/PortableServer.h"
#include "tao/PortableServer/ServantActivatorC.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

// forward declarations
class TAO_LogMgr_i;

/// @class TAO_LogActivator
/// @brief Log Servant Activator
///
/// A servant activator to create Log servants.  Permits servants to
/// be "lazily" created on demand.  This allows persistent logging
/// strategies to avoid creating servants for each log when the
/// service is started.
///
class TAO_Log_Serv_Export TAO_LogActivator
  : public virtual PortableServer::ServantActivator
{
public:
  /// @brief Constructor
  ///
  TAO_LogActivator(TAO_LogMgr_i& logmgr_i);

  /// @brief Destructor
  ///
  virtual ~TAO_LogActivator();

  virtual PortableServer::Servant incarnate (const PortableServer::ObjectId& oid,
					     PortableServer::POA_ptr poa
					     ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((
		     CORBA::SystemException,
		     PortableServer::ForwardRequest
		     ));

  virtual void etherealize (const PortableServer::ObjectId& oid,
			    PortableServer::POA_ptr poa,
			    PortableServer::Servant servant,
			    CORBA::Boolean cleanup_in_progress,
			    CORBA::Boolean remaining_activations
			    ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((
		     CORBA::SystemException
		     ));

private:
  TAO_LogMgr_i&			logmgr_i_;
};

TAO_END_VERSIONED_NAMESPACE_DECL

#endif /* TAO_HAS_MINIMUM_POA */

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