public interface MessageListener
MessageListener
interface and register itself to a consumer instance
to asynchronously receive messages.Modifier and Type | Interface and Description |
---|---|
static interface |
MessageListener.Context |
Modifier and Type | Method and Description |
---|---|
void |
onReceived(Message message,
MessageListener.Context context)
Callback method to receive incoming messages.
|
void onReceived(Message message, MessageListener.Context context)
A message listener should handle different types of Message
.
message
- the received message object.context
- the context delivered to the consume thread.Copyright © 2017–2020 OpenMessaging. All rights reserved.