Refactor PubSubHeaders, StompHeaders, MessageBuilder

Rename to PubSubHeaderAccessor and StompHeaderAccessor
Move the renamed classes to support packages

Remove fromPayloadAndHeaders from MessageBuilder, just use
withPayload(..).copyHeaders(..) instead.
This commit is contained in:
Rossen Stoyanchev
2013-06-19 11:30:01 -04:00
parent 811bb1b0c9
commit 5cfc59d76d
14 changed files with 111 additions and 131 deletions

View File

@@ -93,18 +93,6 @@ public final class MessageBuilder<T> {
return builder;
}
/**
* Create a builder for a new {@link Message} instance with the provided payload and
* headers.
*
* @param payload the payload for the new message
* @param headers the headers to use
*/
public static <T> MessageBuilder<T> fromPayloadAndHeaders(T payload, Map<String, Object> headers) {
MessageBuilder<T> builder = new MessageBuilder<T>(payload, headers);
return builder;
}
/**
* Create a builder for a new {@link Message} instance with the provided payload.
*