Package de.otto.synapse.message
Class TextMessage
java.lang.Object
de.otto.synapse.message.Message<java.lang.String>
de.otto.synapse.message.TextMessage
- All Implemented Interfaces:
java.io.Serializable
public class TextMessage extends Message<java.lang.String>
A
Message that is used by Synapse for messages with String payloads.- See Also:
- Serialized Form
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedTextMessage(Key key, Header header, java.lang.String payload) -
Method Summary
Modifier and Type Method Description static TextMessageof(Key key, Header header, java.lang.String payload)Factory method used to create aTextMessagefrom key, header and payload parameters.static TextMessageof(Key key, java.lang.String payload)Factory method used to create aTextMessagefrom key and payload parameters.static TextMessageof(Message<java.lang.String> message)Factory method used to create aTextMessagefrom anotherMessage<String>static TextMessageof(java.lang.String key, Header header, java.lang.String payload)Factory method used to create aTextMessagefrom key, header and payload parameters.static TextMessageof(java.lang.String key, java.lang.String payload)Factory method used to create aTextMessagefrom key and payload parameters.
-
Constructor Details
-
Method Details
-
of
Factory method used to create aTextMessagefrom anotherMessage<String>- Parameters:
message- a message with payload-typeString- Returns:
- TextMessage
-
of
@Nonnull public static TextMessage of(@Nonnull Key key, @Nonnull Header header, @Nullable java.lang.String payload)Factory method used to create aTextMessagefrom key, header and payload parameters.- Parameters:
key- Key of the created messageheader- Header of the created messagepayload- Payload of the created message- Returns:
- TextMessage
-
of
@Nonnull public static TextMessage of(@Nonnull java.lang.String key, @Nonnull Header header, @Nullable java.lang.String payload)Factory method used to create aTextMessagefrom key, header and payload parameters.- Parameters:
key- Key of the created messageheader- Header of the created messagepayload- Payload of the created message- Returns:
- TextMessage
-
of
Factory method used to create aTextMessagefrom key and payload parameters.- Parameters:
key- Key of the created messagepayload- Payload of the created message- Returns:
- TextMessage
-
of
Factory method used to create aTextMessagefrom key and payload parameters.- Parameters:
key- Key of the created messagepayload- Payload of the created message- Returns:
- TextMessage
-