ACE_Proactor_Handle_Timeout_Upcall(3)

ACE_Proactor_Handle_Timeout_Upcall3

Functor for ace_timer_queue.

Usage

#include <ace/Proactor.h>
class ACE_Proactor_Handle_Timeout_Upcall
{
  public:
    friend class ACE_Proactor;
    ACE_Proactor_Handle_Timeout_Upcall (void);
    int timeout (
        TIMER_QUEUE &timer_queue,
        ACE_Handler *handler,
        const void *arg,
        const ACE_Time_Value &cur_time
        );
    int cancellation (TIMER_QUEUE &timer_queue, ACE_Handler *handler);
    int deletion (
        TIMER_QUEUE &timer_queue,
        ACE_Handler *handler,
        const void *arg
        );
  protected:
    int proactor (ACE_Proactor &proactor);
    ACE_Proactor *proactor_;
};

Overview

This class implements the functor required by the Timer Queue to call handle_timeout on ACE_Handlers.

Public members

friend class ACE_Proactor;

The main Proactor class has special permissions.

ACE_Proactor_Handle_Timeout_Upcall (void);

Constructor.

int timeout (
    TIMER_QUEUE &timer_queue,
    ACE_Handler *handler,
    const void *arg,
    const ACE_Time_Value &cur_time
    );

This method is called when the timer expires.

int cancellation (TIMER_QUEUE &timer_queue, ACE_Handler *handler);

This method is called when the timer is canceled.

int deletion (
    TIMER_QUEUE &timer_queue,
    ACE_Handler *handler,
    const void *arg
    );

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

Protected members

int proactor (ACE_Proactor &proactor);

Set the proactor. This will fail, if one is already set!

ACE_Proactor *proactor_;

Handle to the proactor. This is needed for posting a timer result to the Proactor's completion queue.

Library

ace