Added JavaDoc for new constructor.

This commit is contained in:
Mark Fisher
2008-02-22 19:38:09 +00:00
parent 51d9c8e42c
commit 701743c979

View File

@@ -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);