3 //=============================================================================
5 * @file Identity_Server.h
7 * Driver for identity server, which is used to test/demonstrate
8 * the functionality of the Load Balancing service.
10 * @author Marina Spivak <marina@cs.wustl.edu>
12 //=============================================================================
15 #ifndef IDENTITY_SERVER_H_
16 #define IDENTITY_SERVER_H_
18 #include "tao/Utils/ORB_Manager.h"
19 #include "Load_BalancerC.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 * @class Identity_Server
28 * Contacts the <Object_Group_Factory> in the Load Balancing Server
29 * to create two <Object_Group>s, one round robin and one random.
30 * Then, creates a number of <Identity> objects and registers them with
31 * the created <Object_Group>s in a manner specified by the
32 * commandline arguments.
37 /// Default constructor.
43 /// Performs all the initializations necessary before going into the
45 int init (int argc
, ACE_TCHAR
*argv
[]);
51 /// Parses the commandline arguments.
52 int parse_args (int argc
, ACE_TCHAR
*argv
[]);
55 * Creates the specified number of identity objects, and registers
56 * each one with the provided <Object_Group>. Identity servants are
58 *"Identity object 1" .... "Identity object <number_of_objects>".
60 void create_objects (size_t number_of_objects
,
61 Load_Balancer::Object_Group_ptr group
);
64 TAO_ORB_Manager orb_manager_
;
66 /// The ior of the <Object_Group_Factory> object we shall use to
67 /// create <Object_Group>s to load balance our <Identity> objects.
68 const ACE_TCHAR
*group_factory_ior_
;
70 /// Number of <Identity> objects to create for registering with
71 /// the random <Object_Group>. The default value is 5.
72 size_t random_objects_
;
74 /// Number of <Identity> objects to create for registering with the
75 /// round robin <Object_Group>. The default value is 5.
79 #endif /* IDENTITY_SERVER_H_ */