public final class Message extends Object
| Constructor and Description |
|---|
Message(byte[] serializedMessage)
Construcor for a
Message created from a fully and properly serialized message byte[]. |
Message(byte[] content,
Map<String,String> properties)
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContent() |
Map<String,String> |
getProperties() |
byte[] |
toByteArray()
Serializes the
Message to a byte[]. |
String |
toString() |
public Message(byte[] content,
Map<String,String> properties)
Message with content byte[] and Map properties.
Both content and properties may be null.content - The message content as a string. Null creates an empty content byte[]properties - The string to string map of peroperties for this message. Null creates an empty Mappublic Message(byte[] serializedMessage)
Message created from a fully and properly serialized message byte[].serializedMessage - The fully serialized message.IllegalArgumentException - If the byte[] cannot be de-serialized.public byte[] toByteArray()
throws IOException
Message to a byte[].byte[].IOException - If this Message cannot be serialized.public byte[] getContent()
Copyright © 2018. All rights reserved.