summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Service.h
blob: 8b5f9898a193cf1bb4b5fa06984d2300b236aaf4 (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
// -*- C++ -*-

/**
 *  @file Service.h
 *
 *  $Id$
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 */

#ifndef TAO_Notify_SERVICE_H
#define TAO_Notify_SERVICE_H
#include /**/ "ace/pre.h"

#include "orbsvcs/Notify/notify_serv_export.h"

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

#include "tao/Versioned_Namespace.h"

#include "ace/Service_Object.h"
#include "ace/Service_Config.h"
#include "ace/CORBA_macros.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace PortableServer
{
  class POA;
  typedef POA *POA_ptr;
}

namespace CosNotifyChannelAdmin
{
  class EventChannelFactory;
  typedef EventChannelFactory *EventChannelFactory_ptr;
}

namespace CORBA
{
  class ORB;
  typedef ORB *ORB_ptr;
}

/**
 * @class TAO_Notify_Service
 *
 * @brief Abstract ACE_Service_Object interface that is a
 * factory for creating a Notify EventChannelFactory.
 *
 */
class TAO_Notify_Serv_Export TAO_Notify_Service : public ACE_Service_Object
{
public:
  /// Destructor.
  virtual ~TAO_Notify_Service (void);

  /// Load an implementation of the TAO_Notify_Service based on which
  /// implementations are loaded.
  static TAO_Notify_Service* load_default (void);

  /// Init the service from configurator
  virtual int init (int argc, ACE_TCHAR *argv[]) = 0;

  /// Init the service.
  virtual void init_service (CORBA::ORB_ptr orb) = 0;

  /// Init the service with separate dispatching orb.
  virtual void init_service2 (CORBA::ORB_ptr orb, CORBA::ORB_ptr dispatching_orb) = 0;

  /// Finalize the service.  This hook allows the service to
  /// perform actions when the user wants it to shut down.
  virtual void finalize_service (
      CosNotifyChannelAdmin::EventChannelFactory_ptr factory) = 0;

  /// Create the Channel Factory.
  virtual CosNotifyChannelAdmin::EventChannelFactory_ptr create (
      PortableServer::POA_ptr default_POA,
      const char* factory_name = "EventChannelFactory") = 0;
};

TAO_END_VERSIONED_NAMESPACE_DECL

/// @deprecated Use TAO_COS_NOTIFICATION_SERVICE_NAME instead.
#define TAO_NOTIFY_DEF_EMO_FACTORY_NAME "Notify_Default_Event_Manager_Objects_Factory"

#define TAO_NOTIFICATION_SERVICE_NAME "TAO_Notify_Service"

#define TAO_COS_NOTIFICATION_SERVICE_NAME "TAO_CosNotify_Service"

#define TAO_RT_NOTIFICATION_SERVICE_NAME "TAO_RT_Notify_Service"

#define TAO_MC_NOTIFICATION_SERVICE_NAME "TAO_MC_Notify_Service"

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