2 //=============================================================================
6 //=============================================================================
8 #ifndef TAO_MSAE_TEST_I_H
9 #define TAO_MSAE_TEST_I_H
16 * @brief Test implementation
18 * Implements the Test interface in test.idl
20 class Test_i
: public POA_A::Test
24 Test_i (CORBA::ORB_ptr orb
,
25 A::AMI_TestHandler_ptr rh
,
26 A::RunMode mode
= A::RM_SLAVE
);
28 void set_opponent (A::Test_ptr opp
);
30 virtual void request (
31 ::A::RequestMode mode
,
32 ::CORBA::ULong
& counter
,
33 ::A::FollowUp_out follow_up
);
43 A::AMI_TestHandler_var rh_
;
45 A::Test_var opponent_
;
53 : public ACE_Event_Handler
56 TestHandler (CORBA::ORB_ptr orb
,
57 CORBA::ULong max_count
,
60 void set_counter (CORBA::ULong counter
);
62 void set_opponent (A::Test_ptr opp
);
64 void set_reply_handler (A::AMI_TestHandler_ptr rh
);
66 virtual int handle_timeout (const ACE_Time_Value
&tv
,
69 virtual int handle_exception (ACE_HANDLE fc
= ACE_INVALID_HANDLE
);
71 void handle_followup (A::FollowUp fup
, CORBA::ULong counter
);
75 CORBA::ORB_ptr
orb () { return this->orb_
.in (); }
76 A::Test_ptr
opponent () { return this->opponent_
.in (); }
77 CORBA::ULong
max_count () { return this->max_count_
; }
78 A::RunMode
mode () { return this->mode_
; }
82 A::Test_var opponent_
;
83 A::AMI_TestHandler_var rh_
;
84 CORBA::ULong max_count_
;
86 CORBA::ULong counter_
;
90 class Test_Reply_i
: public POA_A::AMI_TestHandler
93 Test_Reply_i (CORBA::ORB_ptr orb
,
94 CORBA::ULong max_count
,
97 virtual void request (
98 ::CORBA::ULong counter
,
99 ::A::FollowUp follow_up
);
101 virtual void request_excep (
102 ::Messaging::ExceptionHolder
* excep_holder
);
104 virtual void report (
107 virtual void report_excep (
108 ::Messaging::ExceptionHolder
* excep_holder
);
110 TestHandler
& test_handler () { return this->evh_
; }
117 #endif /* TAO_MSAE_TEST_I_H */