Uses of Class
org.springframework.messaging.support.MessageBuilder
Package
Description
Provides implementations of
Message
along with
a MessageBuilder and MessageHeaderAccessor for building and working with messages and
message headers, as well as various MessageChannel
implementations and channel interceptor support.-
Uses of MessageBuilder in org.springframework.messaging.support
Modifier and TypeMethodDescriptionMessageBuilder.copyHeaders
(Map<String, ?> headersToCopy) Copy the name-value pairs from the provided Map.MessageBuilder.copyHeadersIfAbsent
(Map<String, ?> headersToCopy) Copy the name-value pairs from the provided Map.static <T> MessageBuilder<T>
MessageBuilder.fromMessage
(Message<T> message) Create a builder for a newMessage
instance pre-populated with all the headers copied from the provided message.MessageBuilder.removeHeader
(String headerName) Remove the value for the given header name.MessageBuilder.removeHeaders
(String... headerPatterns) Removes all headers provided via array of 'headerPatterns'.MessageBuilder.setErrorChannel
(MessageChannel errorChannel) MessageBuilder.setErrorChannelName
(String errorChannelName) Set the value for the given header name.MessageBuilder.setHeaderIfAbsent
(String headerName, Object headerValue) Set the value for the given header name only if the header name is not already associated with a value.MessageBuilder.setHeaders
(MessageHeaderAccessor accessor) Set the message headers to use by providing aMessageHeaderAccessor
.MessageBuilder.setReplyChannel
(MessageChannel replyChannel) MessageBuilder.setReplyChannelName
(String replyChannelName) static <T> MessageBuilder<T>
MessageBuilder.withPayload
(T payload) Create a new builder for a message with the given payload.