Interface Message.Converter<I,O>

Type Parameters:
I - the input type (body section value type from the AMQP implementation)
O - the output type (application-specific converted type)
Enclosing interface:
Message
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Message.Converter<I,O>
Functional interface for converting a single AMQP body section value.

This converter is used with Message.body(Converter) to transform the value from the first body section of an AMQP 1.0 message into a desired output type. The input type I corresponds to the native type of the body section value as exposed by the underlying AMQP implementation.

Common Input Types:

  • byte[] - for Data sections containing binary data
  • String - for AmqpValue sections containing strings
  • List<?> - for AmqpSequence sections containing lists
  • Various AMQP types - for AmqpValue sections with typed content (Integer, UUID, Symbol, etc.)
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(I value)
    Convert the given AMQP body section value to the desired output type.
  • Method Details

    • convert

      O convert(I value)
      Convert the given AMQP body section value to the desired output type.
      Parameters:
      value - the body section value from the AMQP message
      Returns:
      the converted value