Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / CSD_Strategy_Tests / TP_Test_3 / ClientApp.h
blobe4b0a7090661b0a50a6506fe7eacf1882b71aafc
1 #ifndef CLIENTAPP_H
2 #define CLIENTAPP_H
4 #include "TestAppBase.h"
5 #include "ClientEngine.h"
6 #include "ServantList_T.h"
7 #include "Callback_i.h"
8 #include "ClientTask.h"
9 #include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
10 #include "tao/ORB.h"
11 #include "ace/SString.h"
14 class ClientApp : public TestAppBase
16 public:
18 ClientApp();
19 virtual ~ClientApp();
21 protected:
23 virtual int run_i(int argc, ACE_TCHAR* argv[]);
26 private:
28 // These are all called, in order, by the run_i() method.
29 int init(int argc, ACE_TCHAR* argv[]);
30 void poa_setup(void);
31 void csd_setup(void);
32 void client_setup(void);
33 void poa_activate(void);
34 void run_clients();
35 void run_orb_event_loop(void);
36 bool check_validity ();
37 void cleanup();
39 // Helper methods used by the methods above.
40 int parse_args(int argc, ACE_TCHAR* argv[]);
42 int set_arg(unsigned& value,
43 const ACE_TCHAR* arg,
44 char opt,
45 const char* name,
46 int min = 0);
48 void usage_statement();
49 int arg_dependency_checks();
51 PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
52 const char* poa_name);
55 typedef ServantList<Callback_i> ServantListType;
57 CORBA::ORB_var orb_;
58 PortableServer::POA_var poa_;
59 TAO::CSD::TP_Strategy_Handle tp_strategy_;
61 ServantListType servants_;
63 ClientTask client_task_;
65 ACE_TString exe_name_;
67 unsigned num_servants_;
68 unsigned num_csd_threads_;
69 unsigned num_orb_threads_;
71 ACE_TString ior_;
72 unsigned client_kind_;
73 unsigned client_id_;
76 #endif