1 //=============================================================================
3 * @file timeout_client.h
5 * Tests timeouts with AMI.
7 * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
9 //=============================================================================
12 #include "timeout_i.h"
14 class TimeoutClient
: public ACE_Task_Base
17 TimeoutClient (CORBA::ORB_ptr orb
,
18 TimeoutObj_ptr timeoutObject
,
19 AMI_TimeoutObjHandler_ptr replyHandlerObject
,
20 TimeoutHandler_i
*timeoutHandler_i
,
21 unsigned long timeToWait
);
26 // Initialize the context of this class.
29 // Run in a separate thread.
32 // Wrapps complex invocations logic.
33 void send (CORBA::Boolean async
,
34 unsigned long local_timeout
,
35 unsigned long remote_sleep
);
37 // Test if the synchronous timeouts still work.
40 // Test the accuracy of the timeouts.
43 // Test if the timeout functionality disturbs non-timeout invocations
49 // A CORBA object reference to the target object.
50 TimeoutObj_var timeoutObject_
;
52 // A CORBA object reference to the reply handler
53 AMI_TimeoutObjHandler_var replyHandlerObject_
;
55 // A pointer to the actual C++ reply handler implementation
56 TimeoutHandler_i
*timeoutHandler_i_
;
58 // Remember the policy manager.
59 CORBA::PolicyManager_var policy_manager_
;
61 // Count test local exceptions
62 unsigned short local_reply_excep_counter_
;
64 const CORBA::Boolean INVOKE_SYNCH
;
66 const CORBA::Boolean INVOKE_ASYNCH
;
68 unsigned long timeToWait_
;