Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / CSD_Strategy_Tests / Broken / ServerApp.h
blob4285af459324925e746223bbb147826e42fb5a7a
1 #ifndef SERVERAPP_H
2 #define SERVERAPP_H
4 #include "TestAppBase.h"
5 #include "ServantList_T.h"
6 #include "ClientTask.h"
7 #include "Foo_B_i.h"
8 #include "Callback_i.h"
9 #include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
10 #include "ace/SString.h"
13 class ServerApp : public TestAppBase
15 public:
16 ServerApp();
17 virtual ~ServerApp() = default;
19 protected:
20 virtual int run_i(int argc, ACE_TCHAR* argv[]);
22 private:
23 // These are all called, in order, by the run_i() method.
24 int init(int argc, ACE_TCHAR* argv[]);
25 void poa_setup();
26 void csd_setup();
27 void servant_setup();
28 void collocated_setup();
29 void poa_activate();
30 void run_collocated_clients();
31 void run_orb_event_loop();
32 bool check_validity ();
33 void cleanup();
35 // Helper methods used by the methods above.
36 int parse_args(int argc, ACE_TCHAR* argv[]);
38 int set_arg(unsigned& value,
39 const ACE_TCHAR* arg,
40 char opt,
41 const char* name,
42 int min = 0);
44 void usage_statement();
45 int arg_dependency_checks();
48 PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
49 const char* poa_name);
51 typedef ServantList<Foo_B_i> FooServantListType;
52 typedef ServantList<Callback_i> CallbackServantListType;
54 CORBA::ORB_var orb_;
55 PortableServer::POA_var poa_;
56 TAO::CSD::TP_Strategy_Handle tp_strategy_;
58 PortableServer::POA_var cb_poa_;
59 TAO::CSD::TP_Strategy_Handle cb_tp_strategy_;
61 FooServantListType foo_servants_;
62 CallbackServantListType cb_servants_;
64 ClientTask collocated_client_task_;
66 ACE_TString exe_name_;
68 ACE_TString ior_filename_prefix_;
69 unsigned num_servants_;
70 unsigned num_csd_threads_;
71 unsigned num_orb_threads_;
72 unsigned num_remote_clients_;
73 unsigned num_collocated_clients_;
74 unsigned collocated_client_kind_;
77 #endif