public
synchronized
void
onConnected()

This will register a message handler factory to create handlers for
message. In case client code defines its own message type, it can define a
message handler factory to create handlers to process those messages.
Messages are processed in a threadpool which is hosted by cluster manager,
and cluster manager will call the factory to create handler, and the
handler is called in the threadpool.
Note that only one message handler factory can be registered with one
message type.

This will send the message to all instances matching the criteria
When there is a reply to the message sent AsyncCallback.onReply will be
invoked. Application can specify a timeout on AsyncCallback. After every
reply is processed AsyncCallback.isDone will be invoked.
This method will return after sending the messages.
This is useful when message need to be sent and current thread need not
wait for response since processing will be done in another thread.

This will send the message to all instances matching the criteria
When there is a reply to the message sent AsynCallback.onReply will be
invoked. Application can specify a timeout on AsyncCallback. After every
reply is processed AsyncCallback.isDone will be invoked.
This method will return only after the AsyncCallback.isDone() returns true
This is useful when message need to be sent and current thread has to wait
for response.
The current thread can use callbackOnReply instance to store application
specific data.