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 CORBA::ULong max_count
= 10,
27 A::RunMode mode
= A::RM_SLAVE
);
29 void set_opponent (A::Test_ptr opp
);
31 virtual void request (
32 ::A::RequestMode mode
,
33 ::CORBA::ULong
& counter
,
34 ::A::FollowUp_out follow_up
);
44 A::AMI_TestHandler_var rh_
;
46 A::Test_var opponent_
;
48 CORBA::ULong max_count_
;
56 : public ACE_Event_Handler
59 TestHandler (CORBA::ORB_ptr orb
,
60 CORBA::ULong max_count
,
63 void set_counter (CORBA::ULong counter
);
65 void set_opponent (A::Test_ptr opp
);
67 void set_reply_handler (A::AMI_TestHandler_ptr rh
);
69 virtual int handle_timeout (const ACE_Time_Value
&tv
,
72 virtual int handle_exception (ACE_HANDLE fc
= ACE_INVALID_HANDLE
);
74 void handle_followup (A::FollowUp fup
, CORBA::ULong counter
);
78 CORBA::ORB_ptr
orb () { return this->orb_
.in (); }
79 A::Test_ptr
opponent () { return this->opponent_
.in (); }
80 CORBA::ULong
max_count () { return this->max_count_
; }
81 A::RunMode
mode () { return this->mode_
; }
85 A::Test_var opponent_
;
86 A::AMI_TestHandler_var rh_
;
87 CORBA::ULong max_count_
;
89 CORBA::ULong counter_
;
93 class Test_Reply_i
: public POA_A::AMI_TestHandler
96 Test_Reply_i (CORBA::ORB_ptr orb
,
97 CORBA::ULong max_count
,
100 virtual void request (
101 ::CORBA::ULong counter
,
102 ::A::FollowUp follow_up
);
104 virtual void request_excep (
105 ::Messaging::ExceptionHolder
* excep_holder
);
107 virtual void report (
110 virtual void report_excep (
111 ::Messaging::ExceptionHolder
* excep_holder
);
113 TestHandler
& test_handler () { return this->evh_
; }
121 #endif /* TAO_MSAE_TEST_I_H */