MonitorFactory.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_MONITOR_FACTORY_BASE_H
00009 #define OPENDDS_DCPS_MONITOR_FACTORY_BASE_H
00010 
00011 #include "ace/Service_Object.h"
00012 #include "ace/Service_Config.h"
00013 #include "tao/corba.h"
00014 #include "dcps_export.h"
00015 #include "dds/DCPS/PublicationInstance.h"
00016 
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 #pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00023 
00024 namespace OpenDDS {
00025 namespace DCPS {
00026 
00027 class Service_Participant;
00028 class DomainParticipantImpl;
00029 class TopicImpl;
00030 class PublisherImpl;
00031 class SubscriberImpl;
00032 class DataWriterImpl;
00033 class DataReaderImpl;
00034 class TransportImpl;
00035 
00036 
00037 class Monitor {
00038 public:
00039   Monitor() { }
00040   virtual ~Monitor() { }
00041   virtual void report() = 0;
00042 };
00043 
00044 /**
00045 * @class MonitorFactory
00046 *
00047 * @brief Null implementation of the MonitorFactory
00048 *
00049 * Full version of this library is implemented by the monitor lib.
00050 */
00051 class OpenDDS_Dcps_Export MonitorFactory
00052   : public ACE_Service_Object {
00053 public:
00054   MonitorFactory();
00055 
00056   virtual ~MonitorFactory();
00057 
00058   /// Factory function to create a service participant monitor object
00059   virtual Monitor* create_sp_monitor(Service_Participant* sp);
00060 
00061   /// Factory function to create a domain participant monitor object
00062   virtual Monitor* create_dp_monitor(DomainParticipantImpl* dp);
00063 
00064   /// Factory function to create a topic monitor object
00065   virtual Monitor* create_topic_monitor(TopicImpl* topic);
00066 
00067   /// Factory function to create a publisher monitor object
00068   virtual Monitor* create_publisher_monitor(PublisherImpl* publisher);
00069 
00070   /// Factory function to create a subscriber monitor object
00071   virtual Monitor* create_subscriber_monitor(SubscriberImpl* subscriber);
00072 
00073   /// Factory function to create a data writer monitor object
00074   virtual Monitor* create_data_writer_monitor(DataWriterImpl* dw);
00075 
00076   /// Factory function to create a data writer periodic monitor object
00077   virtual Monitor* create_data_writer_periodic_monitor(DataWriterImpl* dw);
00078 
00079   /// Factory function to create a data reader monitor object
00080   virtual Monitor* create_data_reader_monitor(DataReaderImpl* dr);
00081 
00082   /// Factory function to create a data reader periodic monitor object
00083   virtual Monitor* create_data_reader_periodic_monitor(DataReaderImpl* dr);
00084 
00085   /// Factory function to create a transport monitor object
00086   virtual Monitor* create_transport_monitor(TransportImpl* transport);
00087 
00088   /// Initialize the monitor (required to report data)
00089   virtual void initialize();
00090 
00091   static int service_initialize();
00092 };
00093 
00094 static int OpenDDS_Requires_MonitorFactory_Initializer =
00095   MonitorFactory::service_initialize();
00096 
00097 } // namespace DCPS
00098 } // namespace OpenDDS
00099 
00100 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00101 
00102 ACE_STATIC_SVC_DECLARE (MonitorFactory)
00103 ACE_FACTORY_DECLARE (OpenDDS_Dcps, MonitorFactory)
00104 
00105 #endif /* OPENDDS_DCPS_MONITOR_FACTORY_BASE_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1