Added JavaDoc for new constructor.
This commit is contained in:
@@ -64,6 +64,15 @@ public class GenericMessage<T> implements Message<T> {
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new message with the given payload. The id will be generated by
|
||||
* the default {@link IdGenerator} strategy. The header will be populated
|
||||
* with the attributes and properties of the provided header.
|
||||
*
|
||||
* @param payload the message payload
|
||||
* @param headerToCopy message header whose attributes and properties should
|
||||
* be copied into the new message's header
|
||||
*/
|
||||
public GenericMessage(T payload, MessageHeader headerToCopy) {
|
||||
this(payload);
|
||||
this.copyHeader(headerToCopy);
|
||||
|
||||
Reference in New Issue
Block a user