Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Event_Handler_Handle_Timeout_Upcall Class Template Reference

Functor for Timer_Queues. More...

#include <Timer_Queue_T.h>

Inheritance diagram for ACE_Event_Handler_Handle_Timeout_Upcall:

Inheritance graph
[legend]
List of all members.

Public Types

typedef ACE_Timer_Queue_T<
ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<
ACE_LOCK >, ACE_LOCK > 
TIMER_QUEUE

Public Methods

 ACE_Event_Handler_Handle_Timeout_Upcall (void)
 Constructor. More...

 ~ACE_Event_Handler_Handle_Timeout_Upcall (void)
 Destructor. More...

int timeout (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg, const ACE_Time_Value &cur_time)
 This method is called when the timer expires. More...

int cancellation (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler)
 This method is called when the timer is cancelled. More...

int deletion (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg)
 This method is called when the timer queue is destroyed and the timer is still contained in it. More...


Private Methods

 ACE_Event_Handler_Handle_Timeout_Upcall (const ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK > &)
void operator= (const ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK > &)

Detailed Description

template<class ACE_LOCK>
class ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >

Functor for Timer_Queues.

This class implements the functor required by the Timer Queue to call <handle_timeout> on ACE_Event_Handlers.

Definition at line 455 of file Timer_Queue_T.h.


Member Typedef Documentation

template<class ACE_LOCK>
typedef ACE_Timer_Queue_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>, ACE_LOCK> ACE_Event_Handler_Handle_Timeout_Upcall::TIMER_QUEUE
 

Definition at line 461 of file Timer_Queue_T.h.


Constructor & Destructor Documentation

template<class ACE_LOCK>
ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::ACE_Event_Handler_Handle_Timeout_Upcall void   
 

Constructor.

Definition at line 292 of file Timer_Queue_T.cpp.

00293 {
00294 }

template<class ACE_LOCK>
ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::~ACE_Event_Handler_Handle_Timeout_Upcall void   
 

Destructor.

Definition at line 297 of file Timer_Queue_T.cpp.

00298 {
00299 }

template<class ACE_LOCK>
ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::ACE_Event_Handler_Handle_Timeout_Upcall const ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK > &    [private]
 


Member Function Documentation

template<class ACE_LOCK>
int ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::cancellation TIMER_QUEUE   timer_queue,
ACE_Event_Handler   handler
 

This method is called when the timer is cancelled.

Definition at line 325 of file Timer_Queue_T.cpp.

References ACE_Event_Handler::handle_close, and ACE_Event_Handler::TIMER_MASK.

00327 {
00328   ACE_UNUSED_ARG (timer_queue);
00329 
00330   // Upcall to the <handler>s handle_close method
00331   handler->handle_close (ACE_INVALID_HANDLE,
00332                          ACE_Event_Handler::TIMER_MASK);
00333   return 0;
00334 }

template<class ACE_LOCK>
int ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::deletion TIMER_QUEUE   timer_queue,
ACE_Event_Handler   handler,
const void *    arg
 

This method is called when the timer queue is destroyed and the timer is still contained in it.

Definition at line 337 of file Timer_Queue_T.cpp.

00340 {
00341   ACE_UNUSED_ARG (timer_queue);
00342   ACE_UNUSED_ARG (handler);
00343   ACE_UNUSED_ARG (arg);
00344 
00345   // Does nothing
00346 
00347   return 0;
00348 }

template<class ACE_LOCK>
void ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::operator= const ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK > &    [private]
 

template<class ACE_LOCK>
int ACE_Event_Handler_Handle_Timeout_Upcall< ACE_LOCK >::timeout TIMER_QUEUE   timer_queue,
ACE_Event_Handler   handler,
const void *    arg,
const ACE_Time_Value   cur_time
 

This method is called when the timer expires.

Definition at line 302 of file Timer_Queue_T.cpp.

References ACE_Timer_Queue_T::cancel, ACE_Event_Handler::handle_timeout, and ACE_Event_Handler::reactor.

00306 {
00307   // Upcall to the <handler>s handle_timeout() method.
00308   if (handler->handle_timeout (cur_time, act) == -1)
00309     {
00310 #if 0
00311       // Commented out until we figure out how to break the coupling that results...
00312       if (handler->reactor ())
00313         // Call the reactor's cancel_timer() method to minimize locking.
00314         handler->reactor ()->cancel_timer (handler, 0); // 0 means "call handle_close()".
00315       else
00316 #endif
00317         // Upcall to the handler's handle_timeout method.
00318         timer_queue.cancel (handler, 0); 
00319     }
00320 
00321   return 0;
00322 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:47:44 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002