Merge pull request #2306 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / examples / Notify / ThreadPool / Consumer_Client.h
blobf5dc2ff31dbce0c25464463fd1d59dcd77cec953
1 /* -*- C++ -*- */
2 /**
3 * @file Consumer_Client.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
8 #ifndef TAO_Notify_CONSUMER_CLIENT_H
9 #define TAO_Notify_CONSUMER_CLIENT_H
11 #include /**/ "ace/pre.h"
12 #include "ace/Task.h"
13 #include "ace/SString.h"
15 #include "ORB_Objects.h"
16 #include "tao/RTCORBA/RTCORBA.h"
18 class TAO_Notify_ThreadPool_Consumer;
20 /**
21 * @class TAO_Notify_ThreadPool_Consumer_Client
23 * @brief
25 class TAO_Notify_ThreadPool_Consumer_Client : public ACE_Task_Base
27 public:
28 /// Constructor
29 TAO_Notify_ThreadPool_Consumer_Client (TAO_Notify_ORB_Objects& orb_objects);
31 /// Destructor
32 ~TAO_Notify_ThreadPool_Consumer_Client ();
34 /// Init
35 void _init ();
37 /// Run
38 void run ();
40 /// Parse Args
41 int parse_args (int argc, ACE_TCHAR *argv[]);
43 /// The thread entry point.
44 virtual int svc ();
46 /// Dump stats.
47 void dump_stats ();
49 protected:
50 /// Create an RT POA with a single threadpool.
51 PortableServer::POA_ptr create_rt_poa ();
53 /// ORB Objects.
54 TAO_Notify_ORB_Objects orb_objects_;
56 /// Lock to serialize internal state.
57 TAO_SYNCH_MUTEX lock_;
59 /// Count how many consumers are done
60 int consumer_done_count_;
62 /// The Consumer.
63 TAO_Notify_ThreadPool_Consumer* consumer_;
65 /// ProxySuppler Thread count.
66 int proxy_supplier_thread_count_;
68 /// Max events that we expect to receive.
69 int max_events_;
71 /// Delay in ms
72 long delay_;
75 #include /**/ "ace/post.h"
76 #endif /* TAO_Notify_CONSUMER_CLIENT_H */