Package | Description |
---|---|
org.springframework.messaging.support |
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. |
Modifier and Type | Method and Description |
---|---|
MessageBuilder<T> |
MessageBuilder.copyHeaders(Map<String,?> headersToCopy)
Copy the name-value pairs from the provided Map.
|
MessageBuilder<T> |
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 new
Message instance pre-populated with all of the
headers copied from the provided message. |
MessageBuilder<T> |
MessageBuilder.removeHeader(String headerName)
Remove the value for the given header name.
|
MessageBuilder<T> |
MessageBuilder.removeHeaders(String... headerPatterns)
Removes all headers provided via array of 'headerPatterns'.
|
MessageBuilder<T> |
MessageBuilder.setErrorChannel(MessageChannel errorChannel) |
MessageBuilder<T> |
MessageBuilder.setErrorChannelName(String errorChannelName) |
MessageBuilder<T> |
MessageBuilder.setHeader(String headerName,
Object headerValue)
Set the value for the given header name.
|
MessageBuilder<T> |
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<T> |
MessageBuilder.setHeaders(MessageHeaderAccessor accessor)
Set the message headers to use by providing a
MessageHeaderAccessor . |
MessageBuilder<T> |
MessageBuilder.setReplyChannel(MessageChannel replyChannel) |
MessageBuilder<T> |
MessageBuilder.setReplyChannelName(String replyChannelName) |
static <T> MessageBuilder<T> |
MessageBuilder.withPayload(T payload)
Create a new builder for a message with the given payload.
|