Interface IncomingMessageConsumer
-
Method Summary
Modifier and TypeMethodDescriptionbooleanconsumeIncomingMessage(@NonNull Message message) Consumes a message instance.booleanconsumeIncomingMessageAsString(@NonNull String encodedString) Consumes a message in an encoded string format.
-
Method Details
-
consumeIncomingMessage
Consumes a message instance.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
falseif a message with the same ping id has already been processed.- Parameters:
message- the message- Returns:
- true if the message was accepted by the plugin
-
consumeIncomingMessageAsString
Consumes a message in an encoded string format.This method will decode strings obtained by calling
OutgoingMessage.asEncodedString(). This means that basic implementations can successfully implementMessengerwithout 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
falseif a message with the same ping id has already been processed.- Parameters:
encodedString- the encoded string- Returns:
- true if the message was accepted by the plugin
-