public final class Consumed extends Object
Deserializer
.Modifier and Type | Method and Description |
---|---|
static <T> XMLMessageListener |
with(com.solace.serdes.Deserializer<T> deserializer,
BiConsumer<BytesXMLMessage,T> onData,
BiConsumer<BytesXMLMessage,RuntimeException> onDeserializationException,
Consumer<JCSMPException> onListenerException)
Creates an
XMLMessageListener used by XMLMessageConsumer with lamda functions for message payload
deserialize. |
public static <T> XMLMessageListener with(com.solace.serdes.Deserializer<T> deserializer, BiConsumer<BytesXMLMessage,T> onData, BiConsumer<BytesXMLMessage,RuntimeException> onDeserializationException, Consumer<JCSMPException> onListenerException)
XMLMessageListener
used by XMLMessageConsumer
with lamda functions for message payload
deserialize.T
- The generic type parameter for the onData callback method.deserializer
- The Deserializer
of type T to process the user properties and payload of the message into
an object. Must not be null.onData
- The BiConsumer callback to provide the original message and deserialized payload of type T.
If null a noop callback is used instead.onDeserializationException
- The BiConsumer callback when message deserialize raises an exception.
The message is provided to handle a processing failure to handle a message
gracefully. If null a noop callback is used instead.onListenerException
- The Consumer callback that is equivalent to
XMLMessageListener.onException(JCSMPException)
. If null a noop callback is used
instead.XMLMessageListener
instance to process messages into objects of type T.IllegalArgumentException
- when deserializer is null.Copyright 2004-2025 Solace Corporation. All rights reserved.