Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / examples / Notify / ThreadPool / Supplier_Client.h
blob94b677193c6589f214713c8a909e4da1405a57ab
1 /* -*- C++ -*- */
2 /**
3 * @file Supplier_Client.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
8 #ifndef TAO_Notify_SUPPLIER_CLIENT_H
9 #define TAO_Notify_SUPPLIER_CLIENT_H
10 #include /**/ "ace/pre.h"
12 #include "ORB_Objects.h"
13 #include "ace/Task.h"
14 #include "ace/SString.h"
16 class TAO_Notify_ThreadPool_Supplier;
18 /**
19 * @class TAO_Notify_ThreadPool_Supplier_Client
21 * @brief Supplier Client
23 class TAO_Notify_ThreadPool_Supplier_Client : public ACE_Task_Base
25 public:
26 /// Constructor
27 TAO_Notify_ThreadPool_Supplier_Client (TAO_Notify_ORB_Objects& orb_objects);
29 /// Destructor
30 ~TAO_Notify_ThreadPool_Supplier_Client ();
32 /// Init
33 void _init (void);
35 /// Run
36 void run (void);
38 /// Parse Args
39 int parse_args (int argc, ACE_TCHAR *argv[]);
41 /// The thread entry point.
42 virtual int svc (void);
44 protected:
45 /// Create an EC
46 CosNotifyChannelAdmin::EventChannel_ptr create_ec (void);
48 /// Write ior to file.
49 void write_ior (void);
51 /// ORB Objects.
52 TAO_Notify_ORB_Objects orb_objects_;
54 /// Supplier that sends events.
55 TAO_Notify_ThreadPool_Supplier* supplier_;
57 /// The Number of consumers that we expect to send an event to.
58 int consumer_count_;
60 /// Name of the file to write the supplier ior to.
61 ACE_TString ior_file_name_;
63 /// Number of threads at the EC
64 int ec_thread_count_;
66 /// Number of Therads at the ProxyConsumer.
67 int proxy_consumer_thread_count_;
69 // Max events to send.
70 int max_events_;
73 #include /**/ "ace/post.h"
74 #endif /* TAO_Notify_SUPPLIER_CLIENT_H */