Class MessageBuilder
java.lang.Object
org.springframework.amqp.core.MessageBuilderSupport<Message>
org.springframework.amqp.core.MessageBuilder
Builds a Spring AMQP Message either from a byte[] body or
 another Message using a fluent API.
- Since:
- 1.3
- Author:
- Gary Russell
- 
Method SummaryModifier and TypeMethodDescriptionandProperties(MessageProperties properties) Makes this builder's properties builder use a reference to properties.build()static MessageBuilderfromClonedMessage(Message message) The final message will have a copy of the message body, the MessageProperties will be cloned (top level only).static MessageBuilderfromMessage(Message message) The final message body will be a direct reference to the message body, the MessageProperties will be a shallow copy.static MessageBuilderwithBody(byte[] body) The final message body will be a direct reference to 'body'.static MessageBuilderwithBody(byte[] body, int from, int to) The final message body will be a new array containing the byte range from 'body'.static MessageBuilderwithClonedBody(byte[] body) The final message body will be a copy of 'body' in a new array.Methods inherited from class org.springframework.amqp.core.MessageBuilderSupportbuildProperties, copyHeaders, copyHeadersIfAbsent, copyProperties, removeHeader, removeHeaders, setAppId, setAppIdIfAbsent, setClusterId, setClusterIdIfAbsent, setContentEncoding, setContentEncodingIfAbsent, setContentLength, setContentLengthIfAbsent, setContentType, setContentTypeIfAbsentOrDefault, setCorrelationId, setCorrelationIdIfAbsent, setDeliveryMode, setDeliveryModeIfAbsentOrDefault, setDeliveryTag, setDeliveryTagIfAbsent, setExpiration, setExpirationIfAbsent, setHeader, setHeaderIfAbsent, setMessageCount, setMessageCountIfAbsent, setMessageId, setMessageIdIfAbsent, setPriority, setPriorityIfAbsentOrDefault, setProperties, setReceivedExchange, setReceivedExchangeIfAbsent, setReceivedRoutingKey, setReceivedRoutingKeyIfAbsent, setRedelivered, setRedeliveredIfAbsent, setReplyTo, setReplyToAddress, setReplyToAddressIfAbsent, setReplyToIfAbsent, setTimestamp, setTimestampIfAbsent, setType, setTypeIfAbsent, setUserId, setUserIdIfAbsent
- 
Method Details- 
withBodyThe final message body will be a direct reference to 'body'.- Parameters:
- body- The body.
- Returns:
- The builder.
 
- 
withClonedBodyThe final message body will be a copy of 'body' in a new array.- Parameters:
- body- The body.
- Returns:
- The builder.
 
- 
withBodyThe final message body will be a new array containing the byte range from 'body'.- Parameters:
- body- The body.
- from- The starting index.
- to- The ending index.
- Returns:
- The builder.
- See Also:
 
- 
fromMessageThe final message body will be a direct reference to the message body, the MessageProperties will be a shallow copy.- Parameters:
- message- The message.
- Returns:
- The builder.
 
- 
fromClonedMessageThe final message will have a copy of the message body, the MessageProperties will be cloned (top level only).- Parameters:
- message- The message.
- Returns:
- The builder.
 
- 
andPropertiesMakes this builder's properties builder use a reference to properties.- Parameters:
- properties- The properties.
- Returns:
- this.
 
- 
build- Specified by:
- buildin class- MessageBuilderSupport<Message>
 
 
-