Interface MessageConverter

    • Field Detail

      • CONVERTER_DEFAULT_PRIORITY

        static final int CONVERTER_DEFAULT_PRIORITY
        Default priority: 100
        See Also:
        Constant Field Values
    • Method Detail

      • canConvert

        boolean canConvert​(Message<?> in,
                           Type target)
        Checks whether this instance of converter can convert the given message in into a Message<T> with T being the type represented by target. When reactive messaging looks for a converter, it picks the first converter returning true for a given message.
        Parameters:
        in - the input message, not null
        target - the target type, generally the type ingested by a method
        Returns:
        true if the conversion is possible, false otherwise.
      • convert

        Message<?> convert​(Message<?> in,
                           Type target)
        Converts the given message in into a Message<T>. This method is only called after a successful call to canConvert(Message, Type) with the given target type.
        Parameters:
        in - the input message
        target - the target type
        Returns:
        the converted message.
      • getPriority

        default int getPriority()
        Specified by:
        getPriority in interface javax.enterprise.inject.spi.Prioritized