@API
public class Message
extends java.lang.Object
| Constructor and Description |
|---|
Message() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBody()
Returns message body as byte array.
|
java.lang.String |
getBodyAsString()
Returns message body as string.
|
java.lang.String |
getConsumerTag()
Returns a consumer tag of the message.
|
RabbitMQDestination |
getDestination() |
com.rabbitmq.client.Envelope |
getEnvelope()
Returns message envelope.
|
com.rabbitmq.client.AMQP.BasicProperties |
getProperties()
Returns basic properties of message.
|
void |
setBody(byte[] body)
Sets message body.
|
void |
setConsumerTag(java.lang.String consumerTag)
Sets consumer tag of the message.
|
void |
setDestination(RabbitMQDestination destination) |
void |
setEnvelope(com.rabbitmq.client.Envelope envelope)
Sets message envelope.
|
void |
setProperties(com.rabbitmq.client.AMQP.BasicProperties properties) |
java.lang.String |
toString() |
public RabbitMQDestination getDestination()
public void setDestination(RabbitMQDestination destination)
public java.lang.String getConsumerTag()
public void setConsumerTag(java.lang.String consumerTag)
consumerTag - Consumer tagpublic com.rabbitmq.client.Envelope getEnvelope()
public void setEnvelope(com.rabbitmq.client.Envelope envelope)
envelope - public com.rabbitmq.client.AMQP.BasicProperties getProperties()
public void setProperties(com.rabbitmq.client.AMQP.BasicProperties properties)
public byte[] getBody()
public java.lang.String getBodyAsString()
The encoding used is either the content-encoding as specified in the properties of the message, or fallback to UTF-8 if not specified.
public void setBody(byte[] body)
body - Message body as byte arraypublic java.lang.String toString()
toString in class java.lang.Object