2 * @file Loopback_Consumer.h
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)
14 #endif /* ACE_LACKS_PRAGMA_ONCE */
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
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
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 ();
47 /// Synchronize access to the internal data
48 TAO_SYNCH_MUTEX mutex_
;
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_
;
63 PortableServer::POA_var default_POA_
;
66 #endif /* ECFL_LOOPBACK_CONSUMER_H */