Java Code Examples for io.cloudevents.v1.CloudEventBuilder#builder()
The following examples show how to use
io.cloudevents.v1.CloudEventBuilder#builder() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CloudEventSupport.java From alibaba-rsocket-broker with Apache License 2.0 | 5 votes |
default CloudEventImpl<T> toCloudEvent(URI source) { CloudEventBuilder<T> builder = CloudEventBuilder.builder(); builder.withId(UUID.randomUUID().toString()); builder.withType(this.getClass().getCanonicalName()); builder.withDataContentType(RSocketMimeType.CloudEventsJson.getType()); builder.withSource(source); builder.withTime(ZonedDateTime.now()); builder.withData((T) this); return builder.build(); }
Example 2
Source File: CloudEventMessageBuilder.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
public CloudEventMessageBuilder() { builder = CloudEventBuilder.builder(); }