@ParametersAreNonnullByDefault public final class ProtonAmqpMessageFactory extends Object
MessageReader and MessageWriter instances based on Qpid Proton Message.| Modifier and Type | Method and Description |
|---|---|
static MessageReader |
createReader(Message message)
Creates a
MessageReader to read a proton-based Message. |
static MessageReader |
createReader(String contentType,
ApplicationProperties props,
Section body)
Creates a MessageReader to read using the
content-type property, application-properties and data payload
of a proton-based Message. |
static MessageWriter<io.cloudevents.rw.CloudEventWriter<Message>,Message> |
createWriter()
Creates a
MessageWriter capable of translating both a structured and binary CloudEvent
to a proton-based AMQP 1.0 Message. |
public static MessageReader createReader(Message message) throws io.cloudevents.rw.CloudEventRWException
MessageReader to read a proton-based Message.
This reader is able to read both binary and structured encoded CloudEvent.message - The proton Message to read from.MessageReader that can read the given proton Message to a CloudEvent representation.io.cloudevents.rw.CloudEventRWException - if something goes wrong while resolving the SpecVersion or if the message has unknown encodingcreateReader(String, ApplicationProperties, Section)public static MessageReader createReader(String contentType, ApplicationProperties props, @Nullable Section body) throws io.cloudevents.rw.CloudEventRWException
content-type property, application-properties and data payload
of a proton-based Message. This reader is able to read both binary and structured encoded CloudEvent.contentType - The content-type of the message payload.props - The application-properties section of the proton-message containing cloud event metadata (attributes and/or extensions).body - The message body or null if the message does not contain any body.MessageReader capable of representing a CloudEvent from the application-properties,
content-type and payload of a proton message.io.cloudevents.rw.CloudEventRWException - if something goes wrong while resolving the SpecVersion or if the message has unknown encodingpublic static MessageWriter<io.cloudevents.rw.CloudEventWriter<Message>,Message> createWriter()
MessageWriter capable of translating both a structured and binary CloudEvent
to a proton-based AMQP 1.0 Message.MessageWriter to write a CloudEvent to Proton Message using structured or binary encoding.Copyright © 2022. All rights reserved.