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(java.util.Map<java.lang.String,?> headersToCopy)
Copy the name-value pairs from the provided Map.
|
MessageBuilder<T> |
MessageBuilder.copyHeadersIfAbsent(java.util.Map<java.lang.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(java.lang.String headerName)
Remove the value for the given header name.
|
MessageBuilder<T> |
MessageBuilder.removeHeaders(java.lang.String... headerPatterns)
Removes all headers provided via array of 'headerPatterns'.
|
MessageBuilder<T> |
MessageBuilder.setErrorChannel(MessageChannel errorChannel) |
MessageBuilder<T> |
MessageBuilder.setErrorChannelName(java.lang.String errorChannelName) |
MessageBuilder<T> |
MessageBuilder.setHeader(java.lang.String headerName,
java.lang.Object headerValue)
Set the value for the given header name.
|
MessageBuilder<T> |
MessageBuilder.setHeaderIfAbsent(java.lang.String headerName,
java.lang.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(java.lang.String replyChannelName) |
static <T> MessageBuilder<T> |
MessageBuilder.withPayload(T payload)
Create a new builder for a message with the given payload.
|