Class DefaultMessageBuilderFactory

java.lang.Object
org.springframework.integration.support.DefaultMessageBuilderFactory
All Implemented Interfaces:
MessageBuilderFactory

public class DefaultMessageBuilderFactory extends Object implements MessageBuilderFactory
Since:
4.0
Author:
Gary Russell, Artem Bilan
  • Constructor Details

    • DefaultMessageBuilderFactory

      public DefaultMessageBuilderFactory()
  • Method Details

    • setReadOnlyHeaders

      public void setReadOnlyHeaders(@Nullable String... readOnlyHeaders)
      Specify a list of headers which should be considered as a read only and prohibited from the population to the message.
      Parameters:
      readOnlyHeaders - the list of headers for readOnly mode. Defaults to MessageHeaders.ID and MessageHeaders.TIMESTAMP.
      Since:
      4.3.2
    • addReadOnlyHeaders

      public void addReadOnlyHeaders(String... readOnlyHeaders)
      Add headers to the configured list of read only headers.
      Parameters:
      readOnlyHeaders - the additional headers.
      Since:
      4.3.10
    • fromMessage

      public <T> MessageBuilder<T> fromMessage(Message<T> message)
      Specified by:
      fromMessage in interface MessageBuilderFactory
    • withPayload

      public <T> MessageBuilder<T> withPayload(T payload)
      Specified by:
      withPayload in interface MessageBuilderFactory