3 // =========================================================================
5 * @file Timer_Handler.cpp
7 * @desc Fires servant upcall after a specified period of delay
9 * @author Mayur Deshpande <mayur@ics.uci.edu>
11 // =========================================================================
13 #include "Timer_Handler.h"
15 Timer_Handler::Timer_Handler (Test::AMH_RoundtripResponseHandler_ptr rh
,
16 Test::Timestamp send_time
)
17 : rh_ (Test::AMH_RoundtripResponseHandler::_duplicate (rh
))
18 , send_time_ (send_time
)
23 Timer_Handler::handle_timeout (const ACE_Time_Value
&,
28 this->rh_
->test_method (this->send_time_
);
30 catch (const CORBA::Exception
& ex
)
32 ex
._tao_print_exception (
33 "Exception in Timer_Handler::handle_timeout\n");
37 // Returning -1 calls handle_close which will clean up and
38 // deregister this handle from the reactor. DO not return anything
39 // else. I changes the return value inadvertently and it caused a
40 // memory leak. should have RTMFed this before. Took me a ****
41 // long time to figure out this memory leak, though in retrospect I
42 // should looked here first.
48 Timer_Handler::handle_close (ACE_HANDLE
,
51 // deregister from the reactor and destruct