public class Message extends Object implements Serializable
Constructor and Description |
---|
Message(byte[] body,
MessageProperties messageProperties) |
Modifier and Type | Method and Description |
---|---|
static void |
addAllowedListPatterns(String... patterns)
Add patterns to the allowed list of permissible package/class name patterns for
deserialization in
toString() . |
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 messageProperties)
public static void addAllowedListPatterns(String... patterns)
toString()
.
The patterns will be applied in order until a match is found.
A class can be fully qualified or a wildcard '*' is allowed at the
beginning or end of the class name.
Examples: com.foo.*
, *.MyClass
.
By default, only java.util
and java.lang
classes will be
deserialized.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()