Module io.cloudevents.core
Package io.cloudevents.core.message.impl
Class BaseStructuredMessageReader
java.lang.Object
io.cloudevents.core.message.impl.BaseStructuredMessageReader
- All Implemented Interfaces:
MessageReader,StructuredMessageReader,io.cloudevents.rw.CloudEventReader
- Direct Known Subclasses:
GenericStructuredMessageReader
Base
MessageReader implementation for a structured message-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V extends io.cloudevents.rw.CloudEventWriter<R>,R>
Rread(io.cloudevents.rw.CloudEventWriterFactory<V, R> writerFactory, io.cloudevents.rw.CloudEventDataMapper<? extends io.cloudevents.CloudEventData> mapper) Read the message as binary encoded message using the provided writer factory.
-
Constructor Details
-
BaseStructuredMessageReader
public BaseStructuredMessageReader()
-
-
Method Details
-
getEncoding
- Specified by:
getEncodingin interfaceMessageReader- Returns:
- The message encoding
-
read
public <V extends io.cloudevents.rw.CloudEventWriter<R>,R> R read(io.cloudevents.rw.CloudEventWriterFactory<V, R> writerFactory, io.cloudevents.rw.CloudEventDataMapper<? extends io.cloudevents.CloudEventData> mapper) Description copied from interface:MessageReaderRead the message as binary encoded message using the provided writer factory.- Specified by:
readin interfaceio.cloudevents.rw.CloudEventReader- Specified by:
readin interfaceMessageReader- Type Parameters:
V- theCloudEventWritertypeR- the return type of theCloudEventWriter- Parameters:
writerFactory- a factory that generates a reader starting from theSpecVersionof the eventmapper- the mapper to use to map the data, if any.
-