=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / performance-tests / CSD_Strategy / TestApps / ServerApp.h
blob075a5b5a3b4c235f261f5e262cff78c59af9aefa
1 //=============================================================================
2 /**
3 * @file ServerApp.h
5 * @author Tim Bradley <bradley_t@ociweb.com>
6 */
7 //=============================================================================
8 #ifndef SERVERAPP_H
9 #define SERVERAPP_H
11 #include "TestInf/TestAppBase.h"
12 #include "TestInf/ServantList_T.h"
13 #include "TestInf/ClientTask.h"
14 #include "TestServant/Foo_i.h"
15 #include "TestServant/Foo_Statistics.h"
16 #include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
17 #include "ace/SString.h"
19 class ServerApp : public TestAppBase
21 public:
22 ServerApp();
23 virtual ~ServerApp();
25 protected:
26 virtual int run_i(int argc, ACE_TCHAR* argv[]);
28 private:
29 // These are all called, in order, by the run_i() method.
30 int init(int argc, ACE_TCHAR* argv[]);
31 void poa_setup();
32 void csd_setup();
33 void servant_setup();
34 void collocated_setup();
35 void poa_activate();
36 void run_collocated_clients();
37 void run_orb_event_loop();
38 bool check_results();
39 void cleanup();
41 // Helper methods used by the methods above.
42 int parse_args(int argc, ACE_TCHAR* argv[]);
44 int set_arg(unsigned& value,
45 const ACE_TCHAR* arg,
46 char opt,
47 const char* name,
48 int min = 0);
50 void usage_statement();
51 int arg_dependency_checks();
53 PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
54 const char* poa_name);
56 typedef ServantList<Foo_i> ServantListType;
58 CORBA::ORB_var orb_;
59 PortableServer::POA_var poa_;
60 TAO::CSD::TP_Strategy_Handle tp_strategy_;
62 ServantListType servants_;
64 ClientTask collocated_client_task_;
66 ACE_TString exe_name_;
67 ACE_TString ior_filename_prefix_;
68 unsigned num_servants_;
69 unsigned num_csd_threads_;
70 unsigned num_orb_threads_;
71 unsigned num_remote_clients_;
72 unsigned num_collocated_clients_;
73 unsigned num_loops_;
74 unsigned use_csd_;
76 ACE_CString scenario_id_;
77 unsigned trial_id_;
79 Foo_Statistics stats_;
82 #endif