Package de.otto.synapse.message
Class TextMessage
- All Implemented Interfaces:
Serializable
A
Message that is used by Synapse for messages with String payloads.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.otto.synapse.message.Message
Message.Builder<P> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextMessageFactory method used to create aTextMessagefrom key, header and payload parameters.static TextMessageFactory method used to create aTextMessagefrom key and payload parameters.static TextMessageFactory method used to create aTextMessagefrom anotherMessage<String>static TextMessageFactory method used to create aTextMessagefrom key, header and payload parameters.static TextMessageFactory method used to create aTextMessagefrom key and payload parameters.
-
Constructor Details
-
TextMessage
-
-
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 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 String key, @Nonnull Header header, @Nullable 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
-