summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Demux/demux_test_server.h
blob: adbb629f8d1fc35ded6cdc882301ca126a9f6956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94

#ifndef DOORS_DEMUX_TEST_SERVER_H
#define DOORS_DEMUX_TEST_SERVER_H

// $Id$
// ============================================================================
//
// = LIBRARY
//    TAO/performance-tests/Demux
//
// = FILENAME
//    demux_test_server.h
//
//    Server-side demux_test class
//
// = AUTHOR
//
//    Aniruddha Gokhale
//
// ============================================================================


#include "ace/Get_Opt.h"
#include "ace/Log_Msg.h"
#include "tao/TAO.h"
#include "orbsvcs/Naming/Naming_Utils.h"

#include "demux_test_i.h"
#include "demux_test_macros.h"

class Demux_Test_Server
{
public:
  Demux_Test_Server (void);
  // ctor

  ~Demux_Test_Server (void);
  // dtor

  int run (CORBA::Environment &);
  // Execute client code.

  int init (int argc, char **argv, CORBA::Environment &);
  // Initialize the communication endpoint with server.

private:
  
  int parse_args (void);
  // parse command line arguments (if any)

  int init_naming_service (void);
  // initialize the naming service

  int argc_;
  // # of arguments on the command line.

  char **argv_;
  // arguments from command line.

  CORBA::ORB_var orb_;
  // the ORB 

  PortableServer::POA_var root_poa_;
  // the root POA (we will not have any objects registerd with this)

  PortableServer::POAManager_var poa_mgr_;
  // The POA manager

  PortableServer::POA_var child_poa_ [TAO_DEMUX_TEST_MAX_POAS];
  // An array of child POAs with the next one being the child of the previous
  // one 

  TAO_Naming_Client my_name_client_;
  // An instance of the name client used for resolving the factory
  // objects.

  Demux_Test_i demux_test_[TAO_DEMUX_TEST_MAX_POAS][TAO_DEMUX_TEST_MAX_OBJS];
  // The actual demux_test objects

  CORBA::ULong num_POAs_;
  // number of POAs

  CORBA::ULong  num_objs_;
  // number of objects

  FILE *poa_fp_;
  // file storing POA names

  FILE *ior_fp_;
  // file for storing IORs
};


#endif /* DOORS_DEMUX_TEST_SERVER_H */