public class Message extends Object implements Serializable
Constructor and Description |
---|
Message(byte[] body)
Construct an instance with the provided body and default
MessageProperties . |
Message(byte[] body,
MessageProperties messageProperties)
Construct an instance with the provided body and properties.
|
Modifier and Type | Method and Description |
---|---|
static void |
addAllowedListPatterns(String... patterns)
Deprecated.
toString() no longer deserializes the body.
|
boolean |
equals(Object obj) |
byte[] |
getBody() |
MessageProperties |
getMessageProperties() |
int |
hashCode() |
static void |
setDefaultEncoding(String encoding)
Set the encoding to use in
toString() when converting the body if
there is no contentEncoding message property present. |
String |
toString() |
public Message(byte[] body)
MessageProperties
.body
- the body.public Message(byte[] body, MessageProperties messageProperties)
body
- the body.messageProperties
- the properties.@Deprecated public static void addAllowedListPatterns(String... patterns)
patterns
- the patterns.public static void setDefaultEncoding(String encoding)
toString()
when converting the body if
there is no contentEncoding
message property present.encoding
- the encoding to use.public byte[] getBody()
public MessageProperties getMessageProperties()