public class DefaultStreamMessageConverter extends Object implements StreamMessageConverter
StreamMessageConverter
.Constructor and Description |
---|
DefaultStreamMessageConverter()
Construct an instance using a
WrapperMessageBuilder . |
DefaultStreamMessageConverter(com.rabbitmq.stream.Codec codec)
Construct an instance using the provided codec.
|
Modifier and Type | Method and Description |
---|---|
com.rabbitmq.stream.Message |
fromMessage(Message message)
Convert from a Message to a Java object.
|
void |
setBuilderSupplier(Supplier<com.rabbitmq.stream.MessageBuilder> builderSupplier)
Set a supplier for a message builder.
|
Message |
toMessage(Object object,
StreamMessageProperties messageProperties) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toMessage
toMessage
public DefaultStreamMessageConverter()
WrapperMessageBuilder
.public DefaultStreamMessageConverter(@Nullable com.rabbitmq.stream.Codec codec)
codec
- the codec.public void setBuilderSupplier(Supplier<com.rabbitmq.stream.MessageBuilder> builderSupplier)
builderSupplier
- the supplier.public Message toMessage(Object object, StreamMessageProperties messageProperties) throws MessageConversionException
toMessage
in interface StreamMessageConverter
MessageConversionException
public com.rabbitmq.stream.Message fromMessage(Message message) throws MessageConversionException
MessageConverter
fromMessage
in interface MessageConverter
fromMessage
in interface StreamMessageConverter
message
- the message to convertMessageConversionException
- in case of conversion failure