Interface BinaryMessage
- All Superinterfaces:
Message
An instance of
BinaryMessage represents an update to binary data.
You do not have to implement this interface yourself. An instance can be constructed using the
CachedMessageFactory.createBinaryMessage(String, byte[]) method of the
CachedMessageFactory that is available on the
CachingPublisher interface.
If you make a subscription to a namespace and receive a BinaryMessage via the
SubscriptionListener.binaryUpdated(com.caplin.datasource.subscription.Subscription, com.caplin.datasource.Peer, BinaryMessage) callback method on your implementation of
SubscriptionListener then you can process the incoming message by calling
getBinary().
Note: After publishing a message, do not reuse the message (e.g. change the content, republish) as this can cause issues.
-
Method Summary
Methods inherited from interface com.caplin.datasource.messaging.Message
getMessageType, getSubject, isImage, setImage
-
Method Details
-
getBinary
byte[] getBinary()Gets the binary payload from the message.
-