public interface DefaultDispatchTarget
When the MessageDispatcher
attempts to deliver a message to an
object, it first looks for a JSONMethod
attributed method
corresponding to the specific message it is trying to deliver. If such a
method is found, that method is invoked. However, if there is no such
method, then the dispatcher checks whether the object implements this
interface; if it does, then it invokes the handleMessage()
method to handle it.
Modifier and Type | Method and Description |
---|---|
void |
handleMessage(Deliverer from,
JSONObject message)
Handle a message for which the
MessageDispatcher could not
find an appropriate specific method to invoke. |
void handleMessage(Deliverer from, JSONObject message) throws MessageHandlerException
MessageDispatcher
could not
find an appropriate specific method to invoke.from
- The sender of the message.message
- The message.MessageHandlerException
- if there was some kind of problem
handling the message.Copyright © 2017. All rights reserved.