Module io.cloudevents.core
Package io.cloudevents.core.message
Interface MessageWriter<CEV extends io.cloudevents.rw.CloudEventWriter<R>,R>
- Type Parameters:
R- return value at the end of the write process.
- All Superinterfaces:
io.cloudevents.rw.CloudEventWriterFactory<CEV,,R> StructuredMessageWriter<R>
@ParametersAreNonnullByDefault
public interface MessageWriter<CEV extends io.cloudevents.rw.CloudEventWriter<R>,R>
extends io.cloudevents.rw.CloudEventWriterFactory<CEV,R>, StructuredMessageWriter<R>
Interface to write the
MessageReader content (CloudEvents attributes, extensions and payload) to a new representation.-
Method Summary
Modifier and TypeMethodDescriptiondefault RwriteBinary(io.cloudevents.CloudEvent event) Write the provided event as binary.default RwriteStructured(io.cloudevents.CloudEvent event, EventFormat format) Write the provided event as structured.default RwriteStructured(io.cloudevents.CloudEvent event, String format) Write the provided event as structured.Methods inherited from interface io.cloudevents.rw.CloudEventWriterFactory
createMethods inherited from interface io.cloudevents.core.message.StructuredMessageWriter
setEvent
-
Method Details
-
writeStructured
Write the provided event as structured.- Parameters:
event- event to write.format-EventFormatto use to serialize the event.- Returns:
- return value at the end of the write process.
-
writeStructured
Write the provided event as structured.- Parameters:
event- event to write.format- string to resolve theEventFormatto use to serialize the event.- Returns:
- return value at the end of the write process.
-
writeBinary
Write the provided event as binary.- Parameters:
event- event to write.- Returns:
- return value at the end of the write process.
-