blob: 1bbd4b933088c4b124d21968f7939bb6d40ecd80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* -*- C++ -*- */
//=============================================================================
/**
* @file Supplier.h
*
* @author Pradeep Gore <pradeep@cs.wustl.edu>
*
* Defines a simple Push Supplier.
*/
//=============================================================================
#ifndef COSECSUPPLIER_H_
#define COSECSUPPLIER_H_
#include "orbsvcs/CosEventCommC.h"
#include "orbsvcs/CosEventChannelAdminC.h"
#include "orbsvcs/CosEventCommS.h"
#include "orbsvcs/CosEventChannelAdminS.h"
/**
* @class Supplier
*
* @brief Supplier
*
* The Supplier is a simple Push Supplier that connects to
* the CosEC and sends events to it.
*/
class Supplier : public POA_CosEventComm::PushSupplier
{
public:
/// This method connects the supplier to the EC.
void open (CosEventChannelAdmin::EventChannel_ptr event_channel);
/// Disconnect from the EC.
void close ();
void connect ();
/// Disconnect from the EC, but do not forget about it or close it.
void disconnect ();
/// Send one event.
void send_event (const CORBA::Any &data);
/// The POA_CosEventComm::PushSupplier method.
virtual void disconnect_push_supplier ();
private:
/// We talk to the EC using this proxy.
CosEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_;
/// We talk to the EC using this proxy.
CosEventChannelAdmin::SupplierAdmin_var supplier_admin_;
};
#endif /* COSECSUPPLIER_H_ */
|