#include <yatengine.h>
Inheritance diagram for MessageDispatcher:

Public Member Functions | |
| MessageDispatcher () | |
| ~MessageDispatcher () | |
| bool | install (MessageHandler *handler) |
| bool | uninstall (MessageHandler *handler) |
| bool | dispatch (Message &msg) |
| bool | enqueue (Message *msg) |
| void | dequeue () |
| bool | dequeueOne () |
| void | warnTime (u_int64_t usec) |
| void | clear () |
| unsigned int | messageCount () |
| unsigned int | handlerCount () |
| void | setHook (MessagePostHook *hook, bool remove=false) |
The dispatcher class is a hub that holds a list of handlers to be called for the messages that pass trough the hub. It can also handle a queue of messages that are typically dispatched by a separate thread.
|
|
Creates a new message dispatcher. |
|
|
Destroys the dispatcher and the installed handlers. |
|
|
Clear all the message handlers and post-dispatch hooks |
|
|
Dispatch all messages from the waiting queue |
|
|
Dispatch one message from the waiting queue
|
|
|
Synchronously dispatch a message to the installed handlers
|
|
|
Put a message in the waiting queue for asynchronous dispatching
|
|
|
Get the number of handlers in this dispatcher
|
|
|
Installs a handler in the dispatcher.
|
|
|
Get the number of messages waiting in the queue
|
|
||||||||||||
|
Install or remove a hook to catch messages after being dispatched
|
|
|
Uninstalls a handler from the dispatcher.
|
|
|
Set a limit to generate warning when a message took too long to dispatch
|
1.4.4