OpenDDS  Snapshot(2023/04/28-20:55)
MonitorFactory.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_DCPS_MONITORFACTORY_H
9 #define OPENDDS_DCPS_MONITORFACTORY_H
10 
11 #include "ace/Service_Object.h"
12 #include "ace/Service_Config.h"
13 #include "tao/corba.h"
14 #include "dcps_export.h"
15 #include "PublicationInstance.h"
16 
17 
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 
23 
24 namespace OpenDDS {
25 namespace DCPS {
26 
27 class Service_Participant;
28 class DomainParticipantImpl;
29 class TopicImpl;
30 class PublisherImpl;
31 class SubscriberImpl;
32 class DataWriterImpl;
33 class DataReaderImpl;
34 class TransportImpl;
35 
36 
37 class Monitor {
38 public:
39  Monitor() { }
40  virtual ~Monitor() { }
41  virtual void report() = 0;
42 };
43 
44 /**
45 * @class MonitorFactory
46 *
47 * @brief Null implementation of the MonitorFactory
48 *
49 * Full version of this library is implemented by the monitor lib.
50 */
52  : public ACE_Service_Object {
53 public:
55 
56  virtual ~MonitorFactory();
57 
58  /// Factory function to create a service participant monitor object
59  virtual Monitor* create_sp_monitor(Service_Participant* sp);
60 
61  /// Factory function to create a domain participant monitor object
62  virtual Monitor* create_dp_monitor(DomainParticipantImpl* dp);
63 
64  /// Factory function to create a topic monitor object
65  virtual Monitor* create_topic_monitor(TopicImpl* topic);
66 
67  /// Factory function to create a publisher monitor object
68  virtual Monitor* create_publisher_monitor(PublisherImpl* publisher);
69 
70  /// Factory function to create a subscriber monitor object
71  virtual Monitor* create_subscriber_monitor(SubscriberImpl* subscriber);
72 
73  /// Factory function to create a data writer monitor object
74  virtual Monitor* create_data_writer_monitor(DataWriterImpl* dw);
75 
76  /// Factory function to create a data writer periodic monitor object
77  virtual Monitor* create_data_writer_periodic_monitor(DataWriterImpl* dw);
78 
79  /// Factory function to create a data reader monitor object
80  virtual Monitor* create_data_reader_monitor(DataReaderImpl* dr);
81 
82  /// Factory function to create a data reader periodic monitor object
83  virtual Monitor* create_data_reader_periodic_monitor(DataReaderImpl* dr);
84 
85  /// Factory function to create a transport monitor object
86  virtual Monitor* create_transport_monitor(TransportImpl* transport);
87 
88  /// Initialize the monitor (required to report data)
89  virtual void initialize();
90 
91  virtual void deinitialize();
92 
93  static int service_initialize();
94 };
95 
98 
99 } // namespace DCPS
100 } // namespace OpenDDS
101 
103 
105 ACE_FACTORY_DECLARE (OpenDDS_Dcps, MonitorFactory)
106 
107 #endif /* OPENDDS_DCPS_MONITOR_FACTORY_BASE_H */
Implements the OpenDDS::DCPS::DomainParticipant interfaces.
virtual void report()=0
Null implementation of the MonitorFactory.
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
#define ACE_STATIC_SVC_DECLARE(SERVICE_CLASS)
static const int OpenDDS_Requires_MonitorFactory_Initializer
Implements the OpenDDS::DCPS::Publisher interfaces.
Definition: PublisherImpl.h:38
Implements the DDS::Topic interface.
Definition: TopicImpl.h:37
Implements the OpenDDS::DCPS::DataWriterRemote interfaces and DDS::DataWriter interfaces.
Implements the DDS::DataReader interface.
#define ACE_FACTORY_DECLARE(CLS, SERVICE_CLASS)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28