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 Type
    Method
    Description
    default R
    writeBinary(io.cloudevents.CloudEvent event)
    Write the provided event as binary.
    default R
    writeStructured(io.cloudevents.CloudEvent event, EventFormat format)
    Write the provided event as structured.
    default R
    writeStructured(io.cloudevents.CloudEvent event, String format)
    Write the provided event as structured.

    Methods inherited from interface io.cloudevents.rw.CloudEventWriterFactory

    create

    Methods inherited from interface io.cloudevents.core.message.StructuredMessageWriter

    setEvent
  • Method Details

    • writeStructured

      default R writeStructured(io.cloudevents.CloudEvent event, String format)
      Write the provided event as structured.
      Parameters:
      event - event to write.
      format - EventFormat to use to serialize the event.
      Returns:
      return value at the end of the write process.
    • writeStructured

      default R writeStructured(io.cloudevents.CloudEvent event, EventFormat format)
      Write the provided event as structured.
      Parameters:
      event - event to write.
      format - string to resolve the EventFormat to use to serialize the event.
      Returns:
      return value at the end of the write process.
    • writeBinary

      default R writeBinary(io.cloudevents.CloudEvent event)
      Write the provided event as binary.
      Parameters:
      event - event to write.
      Returns:
      return value at the end of the write process.