public final class CloudEventBuilder<T> extends Object implements EventBuilder<T,AttributesImpl>
| Modifier and Type | Field and Description |
|---|---|
static String |
SPEC_VERSION |
public static final String SPEC_VERSION
public static <T> CloudEventBuilder<T> builder()
T - The 'data' typepublic static <T> CloudEventBuilder<T> builder(CloudEvent<AttributesImpl,T> base)
public static <T> CloudEventImpl<T> of(T data, AttributesImpl attributes, Collection<ExtensionFormat> extensions)
T - the type of 'data'data - the value of dataattributes - the context attributesCloudEventImpl immutable instanceIllegalStateException - When there are specification constraints
violationspublic CloudEvent<AttributesImpl,T> build(T data, AttributesImpl attributes, Collection<ExtensionFormat> extensions)
EventBuilderbuild in interface EventBuilder<T,AttributesImpl>public CloudEventImpl<T> build()
CloudEvent immutable instanceIllegalStateException - When there are specification constraints
violationspublic CloudEventBuilder<T> withId(String id)
public CloudEventBuilder<T> withSource(URI source)
public CloudEventBuilder<T> withType(String type)
public CloudEventBuilder<T> withTime(ZonedDateTime time)
public CloudEventBuilder<T> withSchemaurl(URI schemaurl)
public CloudEventBuilder<T> withDatacontentencoding(String datacontentencoding)
public CloudEventBuilder<T> withDatacontenttype(String datacontenttype)
public CloudEventBuilder<T> withSubject(String subject)
public CloudEventBuilder<T> withData(T data)
public CloudEventBuilder<T> withExtension(ExtensionFormat extension)
Copyright © 2019. All rights reserved.