public final class CloudEventBuilder extends BaseCloudEventBuilder<CloudEventBuilder,CloudEventV03>
data, extensions| Constructor and Description |
|---|
CloudEventBuilder() |
CloudEventBuilder(CloudEvent event) |
CloudEventBuilder(CloudEventContext context) |
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(CloudEvent event)
public CloudEventBuilder(CloudEventContext context)
protected void setAttributes(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 CloudEventContextWriter withContextAttribute(String name, String value) throws CloudEventRWException
CloudEventRWExceptionpublic CloudEventContextWriter withContextAttribute(String name, URI value) throws CloudEventRWException
CloudEventRWExceptionpublic CloudEventContextWriter withContextAttribute(String name, OffsetDateTime value) throws CloudEventRWException
CloudEventRWExceptionpublic CloudEventContextWriter withContextAttribute(String name, Number value) throws CloudEventRWException
CloudEventRWExceptionpublic CloudEventContextWriter withContextAttribute(String name, Integer value) throws CloudEventRWException
CloudEventRWExceptionpublic CloudEventContextWriter withContextAttribute(String name, Boolean value) throws CloudEventRWException
CloudEventRWExceptionpublic CloudEventContextWriter withContextAttribute(String name, byte[] value) throws CloudEventRWException
CloudEventRWExceptionCopyright © 2024. All rights reserved.