Class AbstractMessageConverter

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract Message createMessage​(java.lang.Object object, MessageProperties messageProperties)
      Crate a message from the payload object and message properties provided.
      protected Message createMessage​(java.lang.Object object, MessageProperties messageProperties, java.lang.reflect.Type genericType)
      Crate a message from the payload object and message properties provided.
      protected boolean isCreateMessageIds()
      Flag to indicate that new messages should have unique identifiers added to their properties before sending.
      void setCreateMessageIds​(boolean createMessageIds)
      Flag to indicate that new messages should have unique identifiers added to their properties before sending.
      Message toMessage​(java.lang.Object object, MessageProperties messageProperties)
      Convert a Java object to a Message.
      Message toMessage​(java.lang.Object object, MessageProperties messagePropertiesArg, java.lang.reflect.Type genericType)
      Convert a Java object to a Message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractMessageConverter

        public AbstractMessageConverter()
    • Method Detail

      • setCreateMessageIds

        public void setCreateMessageIds​(boolean createMessageIds)
        Flag to indicate that new messages should have unique identifiers added to their properties before sending. Default false.
        Parameters:
        createMessageIds - the flag value to set
      • isCreateMessageIds

        protected boolean isCreateMessageIds()
        Flag to indicate that new messages should have unique identifiers added to their properties before sending.
        Returns:
        the flag value
      • createMessage

        protected Message createMessage​(java.lang.Object object,
                                        MessageProperties messageProperties,
                                        @Nullable
                                        java.lang.reflect.Type genericType)
        Crate a message from the payload object and message properties provided. The message id will be added to the properties if necessary later.
        Parameters:
        object - the payload
        messageProperties - the message properties (headers)
        genericType - the type to convert from - used to populate type headers.
        Returns:
        a message
        Since:
        2.1
      • createMessage

        protected abstract Message createMessage​(java.lang.Object object,
                                                 MessageProperties messageProperties)
        Crate a message from the payload object and message properties provided. The message id will be added to the properties if necessary later.
        Parameters:
        object - the payload.
        messageProperties - the message properties (headers).
        Returns:
        a message.