Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Loopback_Consumer.h
blob52fccda55b8a57fe42b2a02ae2ffc4d4cde11d00
1 /**
2 * @file Loopback_Consumer.h
3 */
5 #ifndef TAO_PERF_RTEC_LOOPBACK_CONSUMER_H
6 #define TAO_PERF_RTEC_LOOPBACK_CONSUMER_H
8 #include "Loopback_Supplier.h"
9 #include "orbsvcs/RtecEventCommS.h"
10 #include "orbsvcs/RtecEventChannelAdminC.h"
12 #if !defined (ACE_LACKS_PRAGMA_ONCE)
13 # pragma once
14 #endif /* ACE_LACKS_PRAGMA_ONCE */
16 /**
17 * @class Loopback_Consumer
19 * @brief Implement a simple consumer to keep track of the latency
21 class TAO_RTEC_Perf_Export Loopback_Consumer
22 : public virtual POA_RtecEventComm::PushConsumer
25 public:
26 /// Constructor
27 Loopback_Consumer (CORBA::Long experiment_id,
28 CORBA::Long event_type,
29 Loopback_Supplier *supplier,
30 PortableServer::POA_ptr poa);
32 /// Connect to the event channel
33 void connect (RtecEventChannelAdmin::EventChannel_ptr ec);
35 /// Disconnect from the event channel
36 void disconnect ();
38 //@{
39 /** @name The RtecEventComm::PushConsumer methods
41 virtual void push (const RtecEventComm::EventSet& events);
42 virtual void disconnect_push_consumer ();
43 virtual PortableServer::POA_ptr _default_POA ();
44 //@}
46 private:
47 /// Synchronize access to the internal data
48 TAO_SYNCH_MUTEX mutex_;
50 /// The experiment id
51 CORBA::Long experiment_id_;
53 /// The event type this consumer subscribes to
54 CORBA::Long event_type_;
56 /// The supplier used to close the loopback
57 PortableServer::Servant_var<Loopback_Supplier> supplier_;
59 /// The proxy this object is connected to
60 RtecEventChannelAdmin::ProxyPushSupplier_var proxy_supplier_;
62 /// The default poa
63 PortableServer::POA_var default_POA_;
66 #endif /* ECFL_LOOPBACK_CONSUMER_H */