ACE
6.4.2
|
This class manages the notify pipe of the AIOCB Proactor. More...
Public Member Functions | |
ACE_AIOCB_Notify_Pipe_Manager (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor) | |
virtual | ~ACE_AIOCB_Notify_Pipe_Manager (void) |
Destructor. More... | |
int | notify () |
Send the result pointer through the notification pipe. More... | |
virtual void | handle_read_stream (const ACE_Asynch_Read_Stream::Result &result) |
Public Member Functions inherited from ACE_Handler | |
ACE_Handler (void) | |
A do nothing constructor. More... | |
ACE_Handler (ACE_Proactor *p) | |
A do nothing constructor which allows proactor to be set to <p>. More... | |
virtual | ~ACE_Handler (void) |
Virtual destruction. More... | |
virtual void | handle_write_dgram (const ACE_Asynch_Write_Dgram::Result &result) |
virtual void | handle_read_dgram (const ACE_Asynch_Read_Dgram::Result &result) |
virtual void | handle_write_stream (const ACE_Asynch_Write_Stream::Result &result) |
virtual void | handle_read_file (const ACE_Asynch_Read_File::Result &result) |
virtual void | handle_write_file (const ACE_Asynch_Write_File::Result &result) |
virtual void | handle_accept (const ACE_Asynch_Accept::Result &result) |
This method will be called when an asynchronous accept completes. More... | |
virtual void | handle_connect (const ACE_Asynch_Connect::Result &result) |
This method will be called when an asynchronous connect completes. More... | |
virtual void | handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result) |
virtual void | handle_time_out (const ACE_Time_Value &tv, const void *act=0) |
virtual void | handle_wakeup (void) |
ACE_Proactor * | proactor (void) |
Get the proactor associated with this handler. More... | |
void | proactor (ACE_Proactor *p) |
Set the proactor. More... | |
virtual ACE_HANDLE | handle (void) const |
virtual void | handle (ACE_HANDLE) |
Set the ACE_HANDLE value for this Handler. More... | |
Proxy_Ptr & | proxy (void) |
Private Member Functions | |
ACE_AIOCB_Notify_Pipe_Manager (void) | |
Default constructor. Shouldnt be called. More... | |
Private Attributes | |
ACE_POSIX_AIOCB_Proactor * | posix_aiocb_proactor_ |
The implementation proactor class. More... | |
ACE_Message_Block | message_block_ |
Message block to get ACE_POSIX_Asynch_Result pointer from the pipe. More... | |
ACE_Pipe | pipe_ |
ACE_POSIX_Asynch_Read_Stream | read_stream_ |
To do asynch_read on the pipe. More... | |
Additional Inherited Members | |
Public Types inherited from ACE_Handler | |
typedef ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEX > | Proxy_Ptr |
Protected Attributes inherited from ACE_Handler | |
ACE_Proactor * | proactor_ |
The proactor associated with this handler. More... | |
ACE_HANDLE | handle_ |
The ACE_HANDLE in use with this handler. More... | |
ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEX > | proxy_ |
Refers to proxy for this handler. More... | |
This class manages the notify pipe of the AIOCB Proactor.
This class acts as the Handler for the <Asynch_Read> operations issued on the notify pipe. This class is very useful in implementing <Asynch_Accept> operation class for the <AIOCB_Proactor>. This is also useful for implementing <post_completion> for <AIOCB_Proactor>.
<AIOCB_Proactor> class issues a <Asynch_Read> on the pipe, using this class as the Handler. <POSIX_Asynch_Result *>'s are sent through the notify pipe. When <POSIX_Asynch_Result *>'s show up on the notify pipe, the <POSIX_AIOCB_Proactor> dispatches the completion of the <Asynch_Read_Stream> and calls the <handle_read_stream> of this class. This class calls <complete> on the <POSIX_Asynch_Result *> and thus calls the application handler. Handling the MessageBlock: We give this message block to read the result pointer through the notify pipe. We expect that to read 4 bytes from the notify pipe, for each <accept> call. Before giving this message block to another <accept>, we update <wr_ptr> and put it in its initial position.
ACE_AIOCB_Notify_Pipe_Manager::ACE_AIOCB_Notify_Pipe_Manager | ( | ACE_POSIX_AIOCB_Proactor * | posix_aiocb_proactor | ) |
Constructor. You need the posix proactor because you need to call <application_specific_code>
|
virtual |
Destructor.
|
private |
Default constructor. Shouldnt be called.
|
virtual |
This is the call back method when <Asynch_Read> from the pipe is complete.
Reimplemented from ACE_Handler.
int ACE_AIOCB_Notify_Pipe_Manager::notify | ( | ) |
Send the result pointer through the notification pipe.
|
private |
Message block to get ACE_POSIX_Asynch_Result pointer from the pipe.
|
private |
Pipe for the communication between Proactor and the Asynch_Accept/Asynch_Connect and other post_completions
|
private |
The implementation proactor class.
|
private |
To do asynch_read on the pipe.