Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / CSD_Strategy_Tests / TP_Test_3 / ServerApp.h
blobabec9a82630ac8b3583e6f49ad7a04ff889d2b1f
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"
12 class ServerApp : public TestAppBase
14 public:
15 ServerApp();
16 virtual ~ServerApp() = default;
18 protected:
19 virtual int run_i(int argc, ACE_TCHAR* argv[]);
21 private:
22 // These are all called, in order, by the run_i() method.
23 int init(int argc, ACE_TCHAR* argv[]);
24 void poa_setup();
25 void csd_setup();
26 void servant_setup();
27 void collocated_setup();
28 void poa_activate();
29 void run_collocated_clients();
30 void run_orb_event_loop();
31 bool check_validity ();
32 void cleanup();
34 // Helper methods used by the methods above.
35 int parse_args(int argc, ACE_TCHAR* argv[]);
37 int set_arg(unsigned& value,
38 const ACE_TCHAR* arg,
39 char opt,
40 const char* name,
41 int min = 0);
43 void usage_statement();
44 int arg_dependency_checks();
46 PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
47 const char* poa_name);
49 typedef ServantList<Foo_B_i> FooServantListType;
50 typedef ServantList<Callback_i> CallbackServantListType;
52 CORBA::ORB_var orb_;
53 PortableServer::POA_var poa_;
54 TAO::CSD::TP_Strategy_Handle tp_strategy_;
56 PortableServer::POA_var cb_poa_;
57 TAO::CSD::TP_Strategy_Handle cb_tp_strategy_;
59 FooServantListType foo_servants_;
60 CallbackServantListType cb_servants_;
62 ClientTask collocated_client_task_;
64 ACE_TString exe_name_;
66 ACE_TString ior_filename_prefix_;
67 unsigned num_servants_;
68 unsigned num_csd_threads_;
69 unsigned num_orb_threads_;
70 unsigned num_remote_clients_;
71 unsigned num_collocated_clients_;
72 unsigned collocated_client_kind_;
75 #endif