public class Message
extends java.lang.Object
implements java.io.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(java.lang.String... patterns)
Deprecated.
toString() no longer deserializes the body.
|
boolean |
equals(java.lang.Object obj) |
byte[] |
getBody() |
MessageProperties |
getMessageProperties() |
int |
hashCode() |
static void |
setDefaultEncoding(java.lang.String encoding)
Set the encoding to use in
toString() when converting the body if
there is no contentEncoding message property present. |
java.lang.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(java.lang.String... patterns)
patterns - the patterns.public static void setDefaultEncoding(java.lang.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()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object