Module io.cloudevents.api
Package io.cloudevents.rw
Interface CloudEventWriterFactory<W extends CloudEventWriter<R>,R>
- Type Parameters:
W- The type of theCloudEventWritercreated by this factoryR- The return value of theCloudEventWritercreated by this factory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This factory is used to enforce setting the
SpecVersion as first step in the writing process.-
Method Summary
Modifier and TypeMethodDescriptioncreate(SpecVersion version) Create aCloudEventWriterstarting from the providedSpecVersion
-
Method Details
-
create
Create aCloudEventWriterstarting from the providedSpecVersion- Parameters:
version- the spec version to create the writer- Returns:
- the new writer
- Throws:
CloudEventRWException- if the spec version is invalid or the writer cannot be instantiated.
-