Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / performance-tests / POA / Demux / demux_test_server.h
blobb27a3e87a2bcd94db60751f76b9109507d8a9780
1 //=============================================================================
2 /**
3 * @file demux_test_server.h
5 * Server-side demux_test class
7 * @author Aniruddha Gokhale
8 */
9 //=============================================================================
12 #ifndef DOORS_DEMUX_TEST_SERVER_H
13 #define DOORS_DEMUX_TEST_SERVER_H
15 // @@ The timeprobes should be enabled with make probe=1 !!
16 // #define ACE_ENABLE_TIMEPROBES
18 #include "ace/Get_Opt.h"
19 #include "ace/Log_Msg.h"
20 #include "tao/Timeprobe.h"
21 #include "tao/PortableServer/PortableServer.h"
22 #include "orbsvcs/Naming/Naming_Client.h"
24 #include "demux_test_i.h"
25 #include "demux_test_macros.h"
27 class Demux_Test_Server
29 public:
30 /// ctor
31 Demux_Test_Server ();
33 /// dtor
34 ~Demux_Test_Server ();
36 /// Execute client code.
37 int run ();
39 /// Initialize the communication endpoint with server.
40 int init (int argc, ACE_TCHAR **argv);
42 /// Calculates the statistics by reading different data values from results.dat.
43 int calculate_avg_latency ();
45 private:
46 /// parse command line arguments (if any)
47 int parse_args ();
49 /// initialize the naming service
50 int init_naming_service ();
52 /// # of arguments on the command line.
53 int argc_;
55 /// arguments from command line.
56 ACE_TCHAR **argv_;
58 /// the ORB
59 CORBA::ORB_var orb_;
61 /// the root POA (we will not have any objects registered with this)
62 PortableServer::POA_var root_poa_;
64 /// The POA manager
65 PortableServer::POAManager_var poa_mgr_;
67 /// An array of child POAs with the next one being the child of the previous
68 /// one
69 PortableServer::POA_var child_poa_ [TAO_DEMUX_TEST_MAX_POAS];
71 /// An instance of the name client used for resolving the factory
72 /// objects.
73 TAO_Naming_Client my_name_client_;
75 // Demux_Test_i demux_test_[TAO_DEMUX_TEST_MAX_POAS * TAO_DEMUX_TEST_MAX_OBJS];
76 // The actual demux_test objects
78 /// number of POAs
79 CORBA::ULong num_POAs_;
81 /// number of objects
82 CORBA::ULong num_objs_;
84 /// file storing POA names
85 FILE *poa_fp_;
87 /// file for storing IORs
88 FILE *ior_fp_;
90 /// file for storing Servant Names.
91 FILE *servant_fp_;
93 /// Use the USER_ID policy for servants as opposed to System ID.
94 int use_user_id_;
96 /// Use the Transient POAs for servant activation as opposed
97 /// to persistent POAs.
98 int use_transient_poas_;
102 #endif /* DOORS_DEMUX_TEST_SERVER_H */