// -*- C++ -*- //============================================================================= /** * @file Identity_Client.h * * Code for Identity_Client, which is used in conjunction with * Identity_Server to test/demonstrate the functionality of the * Load Balancing service. * * @author Marina Spivak */ //============================================================================= #ifndef IDENTITY_CLIENT_H_ #define IDENTITY_CLIENT_H_ #include "tao/Utils/ORB_Manager.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ /** * @class Identity_Client * * Contacts the in th Load Balancing Server * to obtain a reference to the type of the * specified on the command line. Then, queries the * for its id and members, and prints that * information. Finally, performs * calls, performing * before each call in order to get the * reference to use for the call. (This provides an example of * fine-grained, i.e., per call, Load Balancing among all the * objects registered with the for the * client's calls. */ class Identity_Client { public: /// Default constructor. Identity_Client (); /// Destructor. ~Identity_Client (); /// Initializes , and parses commandline arguments. int init (int argc, ACE_TCHAR *argv[]); /// See TITLE. int run (); private: /// Parses the commandline arguments. int parse_args (int argc, ACE_TCHAR *argv[]); /// The ORB manager. TAO_ORB_Manager orb_manager_; /// The ior of the object we shall use to /// to obtain an object. const ACE_TCHAR *group_factory_ior_; /// Number of times to invoke method on /// objects. The default value is 5. size_t number_of_invocations_; /** * Flag indicating which to use to obtain references * to objects. Random group should be used if the flag * is set to 1, and round robin group otherwise. Round robin is the * default. */ size_t use_random_; }; #endif /* IDENTITY_CLIENT_H_ */