public interface MessageDispatch
MessageCallback
then messages will be sent to
MessageDispatch.dispatchMessage() instead of MessageCallback.handleMessage().
Typically, dispatchMessage() inserts the message into a queue and returns.
Then, a thread pool removes from the queue and calls
MessageCallback.handleMessage(). The queue should pass the flags
through unaltered.
Modifier and Type | Method and Description |
---|---|
void |
dispatchMessage(Message message,
int flags,
MessageCallback callback)
Dispatch message to queue or thread pool.
|
void dispatchMessage(Message message, int flags, MessageCallback callback)
flags
through unaltered.message
- Message sent from other agent.flags
- Bitwise OR of MessageCallback.NO_FLAGS
,
MessageCallback.RESPONSE_EXPECTED
callback
- Callback to handle the message (currently,
always the same as 'this').