1 //=============================================================================
3 * @file demux_test_server.h
5 * Server-side demux_test class
7 * @author Aniruddha Gokhale
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
34 ~Demux_Test_Server ();
36 /// Execute client code.
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 ();
46 /// parse command line arguments (if any)
49 /// initialize the naming service
50 int init_naming_service ();
52 /// # of arguments on the command line.
55 /// arguments from command line.
61 /// the root POA (we will not have any objects registered with this)
62 PortableServer::POA_var root_poa_
;
65 PortableServer::POAManager_var poa_mgr_
;
67 /// An array of child POAs with the next one being the child of the previous
69 PortableServer::POA_var child_poa_
[TAO_DEMUX_TEST_MAX_POAS
];
71 /// An instance of the name client used for resolving the factory
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
79 CORBA::ULong num_POAs_
;
82 CORBA::ULong num_objs_
;
84 /// file storing POA names
87 /// file for storing IORs
90 /// file for storing Servant Names.
93 /// Use the USER_ID policy for servants as opposed to System 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 */