#include <IOThread.hpp>
Public Member Functions | |
virtual void | addCloseOperation (int fileDescriptor, bool writeEnabled, bool readEnabled) |
Creates and adds a CloseTask to be run in the IOThread. | |
virtual void | addStreamReader (shared_ptr< StreamReader > streamReader) |
Add a StreamReader object. | |
virtual void | addStreamWriter (shared_ptr< StreamWriter > streamWriter) |
Add a StreamWriter object. | |
virtual void | addWriteOperation (int fileDescriptor, size_t bytesToWrite, const char *data, shared_ptr< StreamOperationHandlerMethodBase > streamOperationHandlerWrite) |
Creates and adds a WriteTask to be run in the IOThread. | |
shared_ptr< ActiveObject > | getActiveObject () |
Active Object getter. | |
virtual ACE_Proactor * | getProactor () |
ACE_Proactor getter. | |
IOThread () | |
Constructor. | |
virtual void | run () |
Run the event loop. | |
virtual | ~IOThread () |
Destructor. | |
Friends | |
class | AddStreamReaderTask |
class | AddStreamWriterTask |
class | CloseTask |
class | IOThreadUpdateTask |
class | WriteTask |
IOThread class.
A separate context of execution that 'waits' for device events (read/write operations completed) and handles them.
Definition at line 54 of file IOThread.hpp.
IOThread::IOThread | ( | ) |
Constructor.
Definition at line 47 of file IOThread.cpp.
IOThread::~IOThread | ( | ) | [virtual] |
Destructor.
Definition at line 43 of file IOThread.cpp.
void IOThread::addCloseOperation | ( | int | fileDescriptor, | |
bool | writeEnabled, | |||
bool | readEnabled | |||
) | [virtual] |
Creates and adds a CloseTask to be run in the IOThread.
fileDescriptor | The file descriptor which will be closed |
Definition at line 73 of file IOThread.cpp.
void IOThread::addStreamReader | ( | shared_ptr< StreamReader > | streamReader | ) | [virtual] |
Add a StreamReader object.
This method adds a StreamReader object to the IOThread. This turns on reading for the StreamReader's device.
streamReader | StreamReader object to add to the IOThread |
Definition at line 55 of file IOThread.cpp.
void IOThread::addStreamWriter | ( | shared_ptr< StreamWriter > | streamWriter | ) | [virtual] |
Add a StreamWriter object.
This method adds a StreamWriter object to the IOThread. This makes the StreamWriter's device available to write.
streamWriter | StreamWriter object to add to the IOThread |
Definition at line 61 of file IOThread.cpp.
void IOThread::addWriteOperation | ( | int | fileDescriptor, | |
size_t | bytesToWrite, | |||
const char * | data, | |||
shared_ptr< StreamOperationHandlerMethodBase > | streamOperationHandlerWrite | |||
) | [virtual] |
Creates and adds a WriteTask to be run in the IOThread.
fileDescriptor | The file descriptor to which the write will be done | |
bytesToWrite | The number of bytes to be written | |
data | The data to be written | |
streamOperationHandlerWrite | The handler which will receive the write reply |
Definition at line 67 of file IOThread.cpp.
shared_ptr<ActiveObject> mermaid::support::io::IOThread::getActiveObject | ( | ) | [inline] |
Active Object getter.
Definition at line 130 of file IOThread.hpp.
ACE_Proactor * IOThread::getProactor | ( | ) | [virtual] |
void IOThread::run | ( | ) | [virtual] |
Run the event loop.
This method runs the proactor event loop which handles the io events (read and write replies)
Definition at line 79 of file IOThread.cpp.