Class 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
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TextMessage​(Key key, Header header, java.lang.String payload)  
    • Method Summary

      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TextMessage

        protected TextMessage​(@Nonnull
                              Key key,
                              @Nonnull
                              Header header,
                              @Nullable
                              java.lang.String payload)
    • Method Detail

      • of

        @Nonnull
        public static TextMessage of​(@Nonnull
                                     Message<java.lang.String> message)
        Factory method used to create a TextMessage from another Message<String>
        Parameters:
        message - a message with payload-type String
        Returns:
        TextMessage
      • of

        @Nonnull
        public static TextMessage of​(@Nonnull
                                     Key key,
                                     @Nonnull
                                     Header header,
                                     @Nullable
                                     java.lang.String payload)
        Factory method used to create a TextMessage from key, header and payload parameters.
        Parameters:
        key - Key of the created message
        header - Header of the created message
        payload - 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 a TextMessage from key, header and payload parameters.
        Parameters:
        key - Key of the created message
        header - Header of the created message
        payload - Payload of the created message
        Returns:
        TextMessage
      • of

        @Nonnull
        public static TextMessage of​(@Nonnull
                                     Key key,
                                     @Nullable
                                     java.lang.String payload)
        Factory method used to create a TextMessage from key and payload parameters.
        Parameters:
        key - Key of the created message
        payload - Payload of the created message
        Returns:
        TextMessage
      • of

        public static TextMessage of​(@Nonnull
                                     java.lang.String key,
                                     @Nullable
                                     java.lang.String payload)
        Factory method used to create a TextMessage from key and payload parameters.
        Parameters:
        key - Key of the created message
        payload - Payload of the created message
        Returns:
        TextMessage