Class SerializerMessageConverter

    • Field Detail

    • Constructor Detail

      • SerializerMessageConverter

        public SerializerMessageConverter()
    • Method Detail

      • setIgnoreContentType

        public void setIgnoreContentType​(boolean ignoreContentType)
        Flag to signal that the content type should be ignored and the deserializer used irrespective if it is a text message. Defaults to false, in which case the default encoding is used to convert a text message to a String.
        Parameters:
        ignoreContentType - the flag value to set
      • setDefaultCharset

        public void setDefaultCharset​(java.lang.String defaultCharset)
        Specify the default charset to use when converting to or from text-based Message body content. If not specified, the charset will be "UTF-8".
        Parameters:
        defaultCharset - The default charset.
      • setSerializer

        public void setSerializer​(Serializer<java.lang.Object> serializer)
        The serializer to use for converting Java objects to message bodies.
        Parameters:
        serializer - the serializer to set
      • setDeserializer

        public void setDeserializer​(Deserializer<java.lang.Object> deserializer)
        The deserializer to use for converting from message body to Java object.
        Parameters:
        deserializer - the deserializer to set
      • fromMessage

        public java.lang.Object fromMessage​(Message message)
                                     throws MessageConversionException
        Converts from a AMQP Message to an Object.
        Parameters:
        message - the message to convert
        Returns:
        the converted Java object
        Throws:
        MessageConversionException - in case of conversion failure