Package io.smallrye.reactive.messaging
Class MessageConverter.IdentityConverter
java.lang.Object
io.smallrye.reactive.messaging.MessageConverter.IdentityConverter
- All Implemented Interfaces:
MessageConverter,jakarta.enterprise.inject.spi.Prioritized
- Enclosing interface:
MessageConverter
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.reactive.messaging.MessageConverter
MessageConverter.IdentityConverter -
Field Summary
FieldsFields inherited from interface io.smallrye.reactive.messaging.MessageConverter
CONVERTER_DEFAULT_PRIORITY -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Message<?> in, Type target) Checks whether this instance of converter can convert the given messageininto aMessage<T>withTbeing the type represented bytarget.Message<?> Converts the given messageininto aMessage<T>.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.smallrye.reactive.messaging.MessageConverter
getPriority
-
Field Details
-
INSTANCE
-
-
Method Details
-
canConvert
Description copied from interface:MessageConverterChecks whether this instance of converter can convert the given messageininto aMessage<T>withTbeing the type represented bytarget. When reactive messaging looks for a converter, it picks the first converter returningtruefor a given message.- Specified by:
canConvertin interfaceMessageConverter- Parameters:
in- the input message, notnulltarget- the target type, generally the type ingested by a method- Returns:
trueif the conversion is possible,falseotherwise.
-
convert
Description copied from interface:MessageConverterConverts the given messageininto aMessage<T>. This method is only called after a successful call toMessageConverter.canConvert(Message, Type)with the given target type.- Specified by:
convertin interfaceMessageConverter- Parameters:
in- the input messagetarget- the target type- Returns:
- the converted message.
-