public final class CloudEventBuilder extends BaseCloudEventBuilder<CloudEventBuilder,CloudEventV03>
data, extensions| Constructor and Description |
|---|
CloudEventBuilder() |
CloudEventBuilder(io.cloudevents.CloudEvent event) |
CloudEventBuilder(io.cloudevents.CloudEventContext context) |
| Modifier and Type | Method and Description |
|---|---|
CloudEventV03 |
build()
Build the event
|
CloudEventBuilder |
newBuilder()
Copy this builder, creating a new instance with same values.
|
protected void |
setAttributes(io.cloudevents.CloudEventContext event) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
Boolean value) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
byte[] value) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
Integer value) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
Number value) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
OffsetDateTime value) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
String value) |
io.cloudevents.rw.CloudEventContextWriter |
withContextAttribute(String name,
URI value) |
CloudEventBuilder |
withDataContentType(String dataContentType)
Set the
datacontenttype of the event |
CloudEventBuilder |
withDataSchema(URI dataSchema)
Set the
dataschema of the event. |
CloudEventBuilder |
withId(String id)
Set the
id of the event |
CloudEventBuilder |
withSchemaUrl(URI schemaUrl) |
CloudEventBuilder |
withSource(URI source)
Set the
source of the event |
CloudEventBuilder |
withSubject(String subject)
Set the
subject of the event |
CloudEventBuilder |
withTime(OffsetDateTime time)
Set the
time of the event |
CloudEventBuilder |
withType(String type)
Set the
type of the event |
createEmptyAttributeException, createMissingAttributeException, end, end, requireValidAttributeWrite, withData, withData, withData, withData, withData, withData, withExtension, withExtension, withExtension, withExtension, withExtension, withExtension, withExtension, withExtension, withoutData, withoutDataContentType, withoutDataSchema, withoutExtension, withoutExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfrom, fromContext, fromSpecVersion, v03, v03, v1, v1public CloudEventBuilder()
public CloudEventBuilder(io.cloudevents.CloudEvent event)
public CloudEventBuilder(io.cloudevents.CloudEventContext context)
protected void setAttributes(io.cloudevents.CloudEventContext event)
setAttributes in class BaseCloudEventBuilder<CloudEventBuilder,CloudEventV03>public CloudEventBuilder withId(String id)
CloudEventBuilderid of the eventid - id of the eventpublic CloudEventBuilder withSource(URI source)
CloudEventBuildersource of the eventsource - source of the eventpublic CloudEventBuilder withType(String type)
CloudEventBuildertype of the eventtype - type of the eventpublic CloudEventBuilder withTime(OffsetDateTime time)
CloudEventBuildertime of the eventtime - time of the eventpublic CloudEventBuilder withSubject(String subject)
CloudEventBuildersubject of the eventsubject - subject of the eventpublic CloudEventBuilder withDataContentType(String dataContentType)
CloudEventBuilderdatacontenttype of the eventdataContentType - datacontenttype of the eventpublic CloudEventBuilder withSchemaUrl(URI schemaUrl)
public CloudEventBuilder withDataSchema(URI dataSchema)
CloudEventBuilderdataschema of the event. For CloudEvent v0.3, this will configure the schemaurl attribute.dataSchema - dataschema of the eventpublic CloudEventV03 build()
CloudEventBuilderpublic CloudEventBuilder newBuilder()
CloudEventBuilderpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, String value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, URI value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, OffsetDateTime value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, Number value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, Integer value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, Boolean value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionpublic io.cloudevents.rw.CloudEventContextWriter withContextAttribute(String name, byte[] value) throws io.cloudevents.rw.CloudEventRWException
io.cloudevents.rw.CloudEventRWExceptionCopyright © 2026. All rights reserved.