T - type of the data fieldpublic class CloudEventBuilder<T>
extends java.lang.Object
| Constructor and Description |
|---|
CloudEventBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CloudEvent<T> |
build()
Constructs a new
CloudEvent with the previously-set configuration. |
CloudEventBuilder<T> |
contentType(java.lang.String contentType)
Describe the data encoding format
|
CloudEventBuilder<T> |
data(T data)
The event payload.
|
CloudEventBuilder<T> |
extension(Extension extension) |
CloudEventBuilder<T> |
id(java.lang.String id)
ID of the event.
|
CloudEventBuilder<T> |
schemaURL(java.net.URI schemaURL)
A link to the schema that the data attribute adheres to.
|
CloudEventBuilder<T> |
source(java.net.URI source)
This describes the event producer.
|
CloudEventBuilder<T> |
specVersion(java.lang.String specVersion)
The version of the CloudEvents specification which the event uses.
|
CloudEventBuilder<T> |
time(java.time.ZonedDateTime time)
Timestamp of when the event happened.
|
CloudEventBuilder<T> |
type(java.lang.String type)
Type of occurrence which has happened.
|
public CloudEventBuilder<T> specVersion(java.lang.String specVersion)
public CloudEventBuilder<T> type(java.lang.String type)
public CloudEventBuilder<T> source(java.net.URI source)
public CloudEventBuilder<T> id(java.lang.String id)
public CloudEventBuilder<T> time(java.time.ZonedDateTime time)
public CloudEventBuilder<T> schemaURL(java.net.URI schemaURL)
public CloudEventBuilder<T> contentType(java.lang.String contentType)
public CloudEventBuilder<T> data(T data)
public CloudEventBuilder<T> extension(Extension extension)
public CloudEvent<T> build()
CloudEvent with the previously-set configuration.Copyright © 2018. All Rights Reserved.