public class DefaultMessageBuilderFactory extends Object implements MessageBuilderFactory
Constructor and Description |
---|
DefaultMessageBuilderFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addReadOnlyHeaders(String... readOnlyHeaders)
Add headers to the configured list of read only headers.
|
<T> MessageBuilder<T> |
fromMessage(Message<T> message) |
void |
setReadOnlyHeaders(String... readOnlyHeaders)
Specify a list of headers which should be considered as a read only
and prohibited from the population to the message.
|
<T> MessageBuilder<T> |
withPayload(T payload) |
public void setReadOnlyHeaders(String... readOnlyHeaders)
readOnlyHeaders
- the list of headers for readOnly
mode.
Defaults to MessageHeaders.ID
and MessageHeaders.TIMESTAMP
.public void addReadOnlyHeaders(String... readOnlyHeaders)
readOnlyHeaders
- the additional headers.public <T> MessageBuilder<T> fromMessage(Message<T> message)
fromMessage
in interface MessageBuilderFactory
public <T> MessageBuilder<T> withPayload(T payload)
withPayload
in interface MessageBuilderFactory