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 
00016 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00017 #pragma once
00018 #endif /* ACE_LACKS_PRAGMA_ONCE */
00019 
00020 namespace OpenDDS {
00021 namespace DCPS {
00022 
00023 class Service_Participant;
00024 class DomainParticipantImpl;
00025 class TopicImpl;
00026 class PublisherImpl;
00027 class SubscriberImpl;
00028 class DataWriterImpl;
00029 class DataReaderImpl;
00030 class TransportImpl;
00031 
00032 
00033 class Monitor {
00034 public:
00035   Monitor() { }
00036   virtual ~Monitor() { }
00037   virtual void report() = 0;
00038 };
00039 
00040 /**
00041 * @class MonitorFactory
00042 *
00043 * @brief Null implementation of the MonitorFactory
00044 *
00045 * Full version of this library is implemented by the monitor lib.
00046 */
00047 class OpenDDS_Dcps_Export MonitorFactory
00048   : public ACE_Service_Object {
00049 public:
00050 
00051   //Constructor
00052   MonitorFactory();
00053 
00054   //Destructor
00055   virtual ~MonitorFactory();
00056 
00057   ///Factory function to create a service participant monitor object
00058   virtual Monitor* create_sp_monitor(Service_Participant* sp);
00059 
00060   ///Factory function to create a domain participant monitor object
00061   virtual Monitor* create_dp_monitor(DomainParticipantImpl* dp);
00062 
00063   ///Factory function to create a topic monitor object
00064   virtual Monitor* create_topic_monitor(TopicImpl* topic);
00065 
00066   ///Factory function to create a publisher monitor object
00067   virtual Monitor* create_publisher_monitor(PublisherImpl* publisher);
00068 
00069   ///Factory function to create a subscriber monitor object
00070   virtual Monitor* create_subscriber_monitor(SubscriberImpl* subscriber);
00071 
00072   ///Factory function to create a data writer monitor object
00073   virtual Monitor* create_data_writer_monitor(DataWriterImpl* dw);
00074 
00075   ///Factory function to create a data writer periodic monitor object
00076   virtual Monitor* create_data_writer_periodic_monitor(DataWriterImpl* dw);
00077 
00078   ///Factory function to create a data reader monitor object
00079   virtual Monitor* create_data_reader_monitor(DataReaderImpl* dr);
00080 
00081   ///Factory function to create a data reader periodic monitor object
00082   virtual Monitor* create_data_reader_periodic_monitor(DataReaderImpl* dr);
00083 
00084   ///Factory function to create a transport monitor object
00085   virtual Monitor* create_transport_monitor(TransportImpl* transport);
00086 
00087   ///Initialize the monitor (required to report data)
00088   virtual void initialize();
00089 
00090   static int service_initialize();
00091 };
00092 
00093 static int OpenDDS_Requires_MonitorFactory_Initializer =
00094   MonitorFactory::service_initialize();
00095 
00096 } // namespace DCPS
00097 } // namespace OpenDDS
00098 
00099 ACE_STATIC_SVC_DECLARE (MonitorFactory)
00100 ACE_FACTORY_DECLARE (OpenDDS_Dcps, MonitorFactory)
00101 
00102 #endif /* OPENDDS_DCPS_MONITOR_FACTORY_BASE_H */

Generated on Fri Feb 12 20:05:24 2016 for OpenDDS by  doxygen 1.4.7