public interface IncomingMessageConsumer
Messages
from implementations of MessengerProvider.| Modifier and Type | Method and Description |
|---|---|
boolean |
consumeIncomingMessage(Message message)
Consumes a message instance.
|
boolean |
consumeIncomingMessageAsString(String encodedString)
Consumes a message in an encoded string format.
|
boolean consumeIncomingMessage(@Nonnull Message message)
The boolean returned from this method indicates whether or not the platform accepted the message. Some implementations which have multiple distribution channels may wish to use this result to dispatch the same message back to additional receivers.
The implementation will usually return false if a message
with the same ping id has already been processed.
message - the messageboolean consumeIncomingMessageAsString(@Nonnull String encodedString)
This method will decode strings obtained by calling
OutgoingMessage.asEncodedString(). This means that basic
implementations can successfully implement Messenger without
providing their own serialisation.
The boolean returned from this method indicates whether or not the platform accepted the message. Some implementations which have multiple distribution channels may wish to use this result to dispatch the same message back to additional receivers.
The implementation will usually return false if a message
with the same ping id has already been processed.
encodedString - the encoded stringCopyright © 2018. All rights reserved.