#include <POSIX_Asynch_IO.h>
Inheritance diagram for ACE_POSIX_Asynch_Operation:


Public Methods | |
| int | open (ACE_Handler &handler, ACE_HANDLE handle, const void *completion_key, ACE_Proactor *proactor=0) |
| int | cancel (void) |
| Check the documentation for <ACE_Asynch_Operation::cancel>. More... | |
| ACE_Proactor * | proactor (void) const |
| Return the underlying proactor. More... | |
| ACE_POSIX_Proactor * | posix_proactor (void) const |
| Return the underlying Proactor implementation. More... | |
Protected Methods | |
| ACE_POSIX_Asynch_Operation (ACE_POSIX_Proactor *posix_proactor) | |
| Contructor. More... | |
| virtual | ~ACE_POSIX_Asynch_Operation (void) |
| Destructor. More... | |
Protected Attributes | |
| ACE_POSIX_Proactor * | posix_proactor_ |
| ACE_Proactor * | proactor_ |
| Proactor that this Asynch IO will be registered with. More... | |
| ACE_Handler * | handler_ |
| Handler that will receive the callback. More... | |
| ACE_HANDLE | handle_ |
| I/O handle used for reading. More... | |
Definition at line 151 of file POSIX_Asynch_IO.h.
|
|
Contructor.
Definition at line 206 of file POSIX_Asynch_IO.cpp.
00207 : ACE_Asynch_Operation_Impl (), 00208 posix_proactor_ (posix_proactor), 00209 handler_ (0), 00210 handle_ (ACE_INVALID_HANDLE) 00211 { 00212 } |
|
|
Destructor.
Definition at line 202 of file POSIX_Asynch_IO.cpp.
00203 {
00204 }
|
|
|
Check the documentation for <ACE_Asynch_Operation::cancel>.
Implements ACE_Asynch_Operation_Impl. Reimplemented in ACE_POSIX_Asynch_Accept. Definition at line 183 of file POSIX_Asynch_IO.cpp. References ACE_POSIX_Proactor::cancel_aio, and posix_proactor_. Referenced by ACE_AIOCB_Notify_Pipe_Manager::~ACE_AIOCB_Notify_Pipe_Manager.
00184 {
00185 if (!posix_proactor_)
00186 return -1;
00187 return posix_proactor_->cancel_aio (this->handle_);
00188 }
|
|
||||||||||||||||||||
|
Initializes the factory with information which will be used with each asynchronous call. If (<handle> == ACE_INVALID_HANDLE), <ACE_Handler::handle> will be called on the <handler> to get the correct handle. No need for the Proactor since the sub classes will know the correct implementation Proactor class, since this Operation class itself was created by the correct implementation Proactor class. Implements ACE_Asynch_Operation_Impl. Reimplemented in ACE_POSIX_Asynch_Accept. Definition at line 146 of file POSIX_Asynch_IO.cpp. References ACE_Handler::handle, handle_, handler_, ACE_Proactor::instance, ACE_Handler::proactor, and proactor_. Referenced by ACE_AIOCB_Notify_Pipe_Manager::ACE_AIOCB_Notify_Pipe_Manager, ACE_POSIX_Asynch_Connect::open, ACE_POSIX_Asynch_Accept::open, and ACE_POSIX_Asynch_Transmit_Handler::transmit.
00150 {
00151 this->proactor_ = proactor;
00152 this->handler_ = &handler;
00153 this->handle_ = handle;
00154
00155 // Grab the handle from the <handler> if <handle> is invalid
00156 if (this->handle_ == ACE_INVALID_HANDLE)
00157 this->handle_ = this->handler_->handle ();
00158 if (this->handle_ == ACE_INVALID_HANDLE)
00159 return -1;
00160
00161 #if 0
00162 // @@ If <proactor> is 0, let us not bother about getting this
00163 // Proactor, we have already got the specific implementation
00164 // Proactor.
00165
00166 // If no proactor was passed
00167 if (this->proactor_ == 0)
00168 {
00169 // Grab the proactor from the <Service_Config> if
00170 // <handler->proactor> is zero
00171 this->proactor_ = this->handler_->proactor ();
00172 if (this->proactor_ == 0)
00173 this->proactor_ = ACE_Proactor::instance();
00174 }
00175 #endif /* 0 */
00176
00177 // AIO stuff is present. So no registering.
00178 ACE_UNUSED_ARG (completion_key);
00179 return 0;
00180 }
|
|
|
Return the underlying Proactor implementation.
Definition at line 197 of file POSIX_Asynch_IO.cpp. References posix_proactor_. Referenced by ACE_POSIX_Asynch_Accept::accept, ACE_POSIX_Asynch_Connect::cancel, ACE_POSIX_Asynch_Accept::cancel, ACE_POSIX_Asynch_Accept::cancel_uncompleted, ACE_POSIX_Asynch_Connect::close, ACE_POSIX_Asynch_Accept::close, ACE_POSIX_Asynch_Connect::connect, ACE_POSIX_Asynch_Connect::handle_close, ACE_POSIX_Asynch_Accept::handle_close, ACE_POSIX_Asynch_Accept::handle_input, ACE_POSIX_Asynch_Accept::open, ACE_POSIX_Asynch_Connect::post_result, ACE_POSIX_Asynch_Read_File::read, ACE_POSIX_Asynch_Read_Stream::read, ACE_POSIX_Asynch_Write_File::write, and ACE_POSIX_Asynch_Write_Stream::write.
00198 {
00199 return this->posix_proactor_;
00200 }
|
|
|
Return the underlying proactor.
Implements ACE_Asynch_Operation_Impl. Definition at line 191 of file POSIX_Asynch_IO.cpp. References proactor_. Referenced by ACE_POSIX_Asynch_Read_File::read, ACE_POSIX_Asynch_Read_Stream::read, ACE_POSIX_Asynch_Write_File::write, and ACE_POSIX_Asynch_Write_Stream::write.
00192 {
00193 return this->proactor_;
00194 }
|
|
|
I/O handle used for reading.
Definition at line 209 of file POSIX_Asynch_IO.h. Referenced by ACE_POSIX_Asynch_Accept::close, ACE_POSIX_Asynch_Accept::get_handle, ACE_POSIX_Asynch_Accept::open, open, and ACE_POSIX_Asynch_Accept::set_handle. |
|
|
Handler that will receive the callback.
Definition at line 206 of file POSIX_Asynch_IO.h. Referenced by open. |
|
|
It is easy to get this specific implementation proactor here, since it is the one that creates the correct POSIX_Asynch_* objects. We can use this to get to the implementation proactor directly. Definition at line 200 of file POSIX_Asynch_IO.h. Referenced by cancel, and posix_proactor. |
|
|
Proactor that this Asynch IO will be registered with.
Definition at line 203 of file POSIX_Asynch_IO.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002