Class DefaultMessageBuilderFactory

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

public class DefaultMessageBuilderFactory
extends java.lang.Object
implements MessageBuilderFactory
Since:
4.0
  • Constructor Summary

    Constructors 
    Constructor Description
    DefaultMessageBuilderFactory()  
  • Method Summary

    Modifier and Type Method Description
    void addReadOnlyHeaders​(java.lang.String... readOnlyHeaders)
    Add headers to the configured list of read only headers.
    <T> MessageBuilder<T> fromMessage​(org.springframework.messaging.Message<T> message)  
    void setReadOnlyHeaders​(java.lang.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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setReadOnlyHeaders

      public void setReadOnlyHeaders​(@Nullable java.lang.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​(java.lang.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​(org.springframework.messaging.Message<T> message)
      Specified by:
      fromMessage in interface MessageBuilderFactory
    • withPayload

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