#include <handler_provider.h>
Public Member Functions | |
| handler_provider (kernel::module &module, handler *handler, thread &thread) | |
| ~handler_provider () | |
| void | start (void) |
| void | stop (void) |
| void | set_timer (uint64_t milliseconds) |
| void | set_file_descriptor (int file_descriptor) |
| void | watch_read (void) |
| void | watch_write (void) |
| void | run_now (void) |
| bool | add_to_check_queue (void) |
| void | check (void) |
Private Member Functions | |
| handler_provider (const handler_provider &) | |
| handler_provider & | operator= (const handler_provider &) |
| void | _notify_thread (void) |
| bool | _event_has_changed (void) |
| void | _update_event (void) |
| void | _callback (int file_descriptor, short events) |
Private Attributes | |
| bool | _in_check_queue |
| bool | _need_start |
| bool | _need_run |
| bool | _need_stop |
| bool | _is_processing |
| bool | _is_set |
| bool | _is_added |
| bool | _watch_read |
| bool | _set_watch_read |
| bool | _watch_write |
| bool | _set_watch_write |
| int | _file_descriptor |
| int | _set_file_descriptor |
| thread & | _thread |
| uint64_t | _expire_time |
| uint64_t | _set_expire_time |
| struct event | _event |
| struct timeval | _timer |
Friends | |
| void | handler_provider_callback (int file_descriptor, short events, void *context) |
This is the event handler provider implementation for libevent.
Definition at line 50 of file handler_provider.h.
| scalestack::event::libevent::handler_provider::handler_provider | ( | kernel::module & | module, | |
| handler * | handler, | |||
| thread & | thread | |||
| ) |
Constructor for the handler provider.
| [in] | module | Module that the handler is associated with. |
| [in] | handler | Handler to pair with this handler provider. |
| [in] | thread | Thread to set. |
Definition at line 62 of file handler_provider.cc.
| scalestack::event::libevent::handler_provider::~handler_provider | ( | ) | [virtual] |
Reimplemented from scalestack::event::handler_provider.
Definition at line 87 of file handler_provider.cc.
| scalestack::event::libevent::handler_provider::handler_provider | ( | const handler_provider & | ) | [private] |
Don't allow copying of objects.
| void scalestack::event::libevent::handler_provider::start | ( | void | ) | [virtual] |
Start this handler provider by adding it to a thread.
Implements scalestack::event::handler_provider.
Definition at line 93 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::stop | ( | void | ) | [virtual] |
Implements scalestack::event::handler_provider.
Definition at line 99 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::set_timer | ( | uint64_t | milliseconds | ) | [virtual] |
See event::handler::set_timer().
Implements scalestack::event::handler_provider.
Definition at line 107 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::set_file_descriptor | ( | int | file_descriptor | ) | [virtual] |
See event::handler::set_file_descriptor().
Implements scalestack::event::handler_provider.
Definition at line 121 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::watch_read | ( | void | ) | [virtual] |
See event::handler::watch_read().
Implements scalestack::event::handler_provider.
Definition at line 154 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::watch_write | ( | void | ) | [virtual] |
See event::handler::watch_write().
Implements scalestack::event::handler_provider.
Definition at line 161 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::run_now | ( | void | ) | [virtual] |
See event::handler::run_now().
Implements scalestack::event::handler_provider.
Definition at line 168 of file handler_provider.cc.
| bool scalestack::event::libevent::handler_provider::add_to_check_queue | ( | void | ) |
Ask if the the handler provider should be added to the check queue. If so, also mark that it is now in the queue.
Definition at line 176 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::check | ( | void | ) |
Check to see if the handler provider needs to be started, stopped, run, or updated.
Definition at line 186 of file handler_provider.cc.
| handler_provider& scalestack::event::libevent::handler_provider::operator= | ( | const handler_provider & | ) | [private] |
Don't allow assignment of objects.
| void scalestack::event::libevent::handler_provider::_notify_thread | ( | void | ) | [private] |
Notify handler provider that events should be updated.
Definition at line 261 of file handler_provider.cc.
| bool scalestack::event::libevent::handler_provider::_event_has_changed | ( | void | ) | [private] |
CHeck to see if he event has changed from what is set.
Definition at line 276 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::_update_event | ( | void | ) | [private] |
Update the event handler structure with any changes.
Definition at line 303 of file handler_provider.cc.
| void scalestack::event::libevent::handler_provider::_callback | ( | int | file_descriptor, | |
| short | events | |||
| ) | [private] |
This is called when a libevent event notification happens.
| [in] | file_descriptor | File descriptor for the event. |
| [in] | events | Type of events that are ready. |
Definition at line 408 of file handler_provider.cc.
| void handler_provider_callback | ( | int | file_descriptor, | |
| short | events, | |||
| void * | context | |||
| ) | [friend] |
Function passed to libevent to invoke handler_provider::_callback().
Definition at line 149 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_need_start [private] |
Definition at line 150 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_need_run [private] |
Definition at line 151 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_need_stop [private] |
Definition at line 152 of file handler_provider.h.
Definition at line 153 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_is_set [private] |
Definition at line 154 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_is_added [private] |
Definition at line 155 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_watch_read [private] |
Definition at line 156 of file handler_provider.h.
Definition at line 157 of file handler_provider.h.
bool scalestack::event::libevent::handler_provider::_watch_write [private] |
Definition at line 158 of file handler_provider.h.
Definition at line 159 of file handler_provider.h.
Definition at line 160 of file handler_provider.h.
Definition at line 161 of file handler_provider.h.
Definition at line 162 of file handler_provider.h.
uint64_t scalestack::event::libevent::handler_provider::_expire_time [private] |
Definition at line 163 of file handler_provider.h.
uint64_t scalestack::event::libevent::handler_provider::_set_expire_time [private] |
Definition at line 164 of file handler_provider.h.
struct event scalestack::event::libevent::handler_provider::_event [private] |
Definition at line 165 of file handler_provider.h.
struct timeval scalestack::event::libevent::handler_provider::_timer [private] |
Definition at line 166 of file handler_provider.h.
1.6.3