scalestack::event::handler Class Reference
#include <handler.h>
Detailed Description
This is the event handler base class. Other classes that want to handle events must derive from this.
Definition at line 49 of file handler.h.
Constructor & Destructor Documentation
| scalestack::event::handler::handler |
( |
handler_service & |
handler_service |
) |
[inline] |
| scalestack::event::handler::~handler |
( |
|
) |
[inline, virtual] |
| scalestack::event::handler::handler |
( |
const handler & |
|
) |
[private] |
Don't allow copying of objects.
Member Function Documentation
| void scalestack::event::handler::start |
( |
void |
|
) |
[inline] |
Notify that this event handler is ready to be added to the event service. It is not automatically started on creation because derived classes may not be fully constructed. The started() method may be called before this returns since event service providers may manage this in another thread.
Definition at line 269 of file handler.h.
| void scalestack::event::handler::started |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::event::handler::shutdown |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::event::handler::stop |
( |
void |
|
) |
[inline] |
Notify that this event handler should be stopped. Once this is called, no other methods should be called on the handler object.
Definition at line 283 of file handler.h.
| void scalestack::event::handler::set_timer |
( |
uint64_t |
milliseconds |
) |
[inline] |
Set the timer. Once this timer expires the timer_expired() method is called. Note the timer is not persistent, once the timer_expired() method is called, the timer is no longer set.
- Parameters:
-
| [in] | milliseconds | The number of milliseconds from now for the timer to expire. A value of 0 cancels the timer. |
Definition at line 288 of file handler.h.
| void scalestack::event::handler::timer_expired |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::event::handler::set_file_descriptor |
( |
int |
file_descriptor |
) |
[inline] |
| void scalestack::event::handler::close_file_descriptor |
( |
int |
file_descriptor |
) |
[inline, virtual] |
| void scalestack::event::handler::watch_read |
( |
void |
|
) |
[inline] |
Notify the event service to watch for read events.
Definition at line 307 of file handler.h.
| void scalestack::event::handler::read_ready |
( |
int |
file_descriptor |
) |
[inline, virtual] |
| void scalestack::event::handler::watch_write |
( |
void |
|
) |
[inline] |
Notify the event service to watch for write events.
Definition at line 316 of file handler.h.
| void scalestack::event::handler::write_ready |
( |
int |
file_descriptor |
) |
[inline, virtual] |
| void scalestack::event::handler::run_now |
( |
void |
|
) |
[inline] |
Notify the event service to call run() for this handler from the event loop. This is needed when using event providers that are threaded, and you want the handler to be run on the thread it is assigned to.
Definition at line 325 of file handler.h.
| void scalestack::event::handler::run |
( |
void |
|
) |
[inline, virtual] |
| handler& scalestack::event::handler::operator= |
( |
const handler & |
|
) |
[private] |
Don't allow assignment of objects.
| void scalestack::event::handler::_start |
( |
void |
|
) |
[inline, private] |
| void scalestack::event::handler::_stop |
( |
void |
|
) |
[inline, private] |
Stop the handler by removing it from the handler service and deleting the object.
Definition at line 343 of file handler.h.
Friends And Related Function Documentation
Field Documentation
The documentation for this class was generated from the following file: