Class MessageConverter.IdentityConverter

java.lang.Object
io.smallrye.reactive.messaging.MessageConverter.IdentityConverter
All Implemented Interfaces:
MessageConverter, jakarta.enterprise.inject.spi.Prioritized
Enclosing interface:
MessageConverter

public static class MessageConverter.IdentityConverter extends Object implements MessageConverter
  • Field Details

  • Method Details

    • canConvert

      public boolean canConvert(Message<?> in, Type target)
      Description copied from interface: MessageConverter
      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.
      Specified by:
      canConvert in interface MessageConverter
      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

      public Message<?> convert(Message<?> in, Type target)
      Description copied from interface: MessageConverter
      Converts the given message in into a Message<T>. This method is only called after a successful call to MessageConverter.canConvert(Message, Type) with the given target type.
      Specified by:
      convert in interface MessageConverter
      Parameters:
      in - the input message
      target - the target type
      Returns:
      the converted message.