public static class MessageConverter.IdentityConverter extends Object implements MessageConverter
MessageConverter.IdentityConverter
Modifier and Type | Field and Description |
---|---|
static MessageConverter.IdentityConverter |
INSTANCE |
CONVERTER_DEFAULT_PRIORITY
Modifier and Type | Method and Description |
---|---|
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 . |
Message<?> |
convert(Message<?> in,
Type target)
Converts the given message
in into a Message<T> . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPriority
public static final MessageConverter.IdentityConverter INSTANCE
public boolean canConvert(Message<?> in, Type target)
MessageConverter
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.canConvert
in interface MessageConverter
in
- the input message, not null
target
- the target type, generally the type ingested by a methodtrue
if the conversion is possible, false
otherwise.public Message<?> convert(Message<?> in, Type target)
MessageConverter
in
into a Message<T>
.
This method is only called after a successful call to MessageConverter.canConvert(Message, Type)
with the given target type.convert
in interface MessageConverter
in
- the input messagetarget
- the target typeCopyright © 2018–2021 SmallRye. All rights reserved.