2 //=============================================================================
6 * This class implements a simple server for the
7 * Nested Upcalls - MT Client test
9 * @author Michael Kircher
11 //=============================================================================
13 #ifndef MT_CLIENT_TEST_MT_SERVER_H
14 #define MT_CLIENT_TEST_MT_SERVER_H
16 #include "MT_Object_i.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/Get_Opt.h"
24 #include "ace/Log_Msg.h"
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 class TAO_ORB_Manager
;
28 TAO_END_VERSIONED_NAMESPACE_DECL
33 * @brief This is the server for the mt_object
35 * See the README file for more information.
42 /// Default constructor
48 /// Initialize the MT_Server state - parsing arguments and ...
51 TAO_ORB_Manager
* orb_manager_ptr
);
56 /// Just run it briefly
57 int run_ORB_briefly (void);
60 /// reading the IOR of mt object in
61 int read_ior (ACE_TCHAR
*filename
);
63 /// Parses the commandline arguments.
64 int parse_args (void);
69 /// File to output the IOR of the object A.
70 FILE* ior_output_file_
;
73 TAO_ORB_Manager
* orb_manager_ptr_
;
75 /// Implementation object
76 MT_Object_i mT_Object_i_
;
78 /// reference for the distant MT Object
79 MT_Object_var mT_Object_var_
;
81 /// Number of commandline arguments.
84 /// commandline arguments.
87 /// number of times the server should call to the disted MT OBject
88 unsigned int iterations_
;
90 /// IOR of our servant.
91 CORBA::String_var str_
;
96 * @class MT_Server_Task
98 * @brief Wrapper for the MT_Server to be an extra thread
100 * No big purpose, just wrapping
102 class MT_Server_Task
: public ACE_Task
<ACE_SYNCH
>
105 MT_Server_Task (ACE_Thread_Manager
* thr_mgr_ptr
,
108 TAO_ORB_Manager
* orb_manager_ptr
);
110 virtual int svc (void);
113 MT_Server mT_Server_
;
116 TAO_ORB_Manager
* orb_manager_ptr_
;
120 #endif /* MT_CLIENT_TEST_MT_SERVER_H */