public class TextMessage extends Message<java.lang.String>
Message that is used by Synapse for messages with String payloads.Message.Builder<P>| Modifier | Constructor and Description |
|---|---|
protected |
TextMessage(Key key,
Header header,
java.lang.String payload) |
| Modifier and Type | Method and Description |
|---|---|
static TextMessage |
of(Key key,
Header header,
java.lang.String payload)
Factory method used to create a
TextMessage from key, header and payload parameters. |
static TextMessage |
of(Key key,
java.lang.String payload)
Factory method used to create a
TextMessage from key and payload parameters. |
static TextMessage |
of(Message<java.lang.String> message)
Factory method used to create a
TextMessage from another Message<String> |
static TextMessage |
of(java.lang.String key,
Header header,
java.lang.String payload)
Factory method used to create a
TextMessage from key, header and payload parameters. |
static TextMessage |
of(java.lang.String key,
java.lang.String payload)
Factory method used to create a
TextMessage from key and payload parameters. |
@Nonnull public static TextMessage of(@Nonnull Message<java.lang.String> message)
TextMessage from another Message<String>message - a message with payload-type String@Nonnull public static TextMessage of(@Nonnull Key key, @Nonnull Header header, @Nullable java.lang.String payload)
TextMessage from key, header and payload parameters.key - Key of the created messageheader - Header of the created messagepayload - Payload of the created message@Nonnull public static TextMessage of(@Nonnull java.lang.String key, @Nonnull Header header, @Nullable java.lang.String payload)
TextMessage from key, header and payload parameters.key - Key of the created messageheader - Header of the created messagepayload - Payload of the created message@Nonnull public static TextMessage of(@Nonnull Key key, @Nullable java.lang.String payload)
TextMessage from key and payload parameters.key - Key of the created messagepayload - Payload of the created messagepublic static TextMessage of(@Nonnull java.lang.String key, @Nullable java.lang.String payload)
TextMessage from key and payload parameters.key - Key of the created messagepayload - Payload of the created message