INT-4314: MutableMessageBuilder Javadocs
JIRA: https://jira.spring.io/browse/INT-4314
This commit is contained in:
committed by
Artem Bilan
parent
f35aa13636
commit
56de7149c3
@@ -27,11 +27,18 @@ import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* An implementation of {@link Message} with a generic payload. Unlike
|
||||
* {@link GenericMessage}, this message (or its headers) can be modified
|
||||
* after creation. Great care must be taken, when mutating messages, that
|
||||
* some other element/thread is not concurrently using the message. Also note
|
||||
* that any in-memory stores (such as {@link SimpleMessageStore}) may have
|
||||
* a reference to the message and changes will be reflected there too.
|
||||
* {@link GenericMessage}, this message (or its headers) can be modified after creation.
|
||||
* Great care must be taken, when mutating messages, that some other element/thread is not
|
||||
* concurrently using the message. Also note that any in-memory stores (such as
|
||||
* {@link SimpleMessageStore}) may have a reference to the message and changes will be
|
||||
* reflected there too.
|
||||
*
|
||||
* <p>
|
||||
* <b>IMPORTANT: Mutable messages may share state (such as message headers); such messages
|
||||
* should never be exposed to other components or undesirable side-effects may result.</b>
|
||||
* <p>
|
||||
* <b>It is generally recommended that messages transferred between components should
|
||||
* always be immutable unless great care is taken with their use.</b>
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -30,6 +30,16 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
/**
|
||||
* Specialized message builder that can be used within a component to avoid the overhead
|
||||
* of having to build multiple messages for mutations within that component.
|
||||
*
|
||||
* <p>
|
||||
* <b>IMPORTANT: Mutable messages may share state (such as message headers); such messages
|
||||
* should never be exposed to other components or undesirable side-effects may result.</b>
|
||||
* <p>
|
||||
* <b>It is generally recommended that messages transferred between components should
|
||||
* always be immutable unless great care is taken with their use.</b>
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
* @since 4.0
|
||||
|
||||
Reference in New Issue
Block a user