Class CloudEventMessageBuilder<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.cloudevents.CloudEventMessageBuilder<T>
-
- All Implemented Interfaces:
io.cloudevents.fun.EventBuilder<T,io.cloudevents.v1.AttributesImpl>
public class CloudEventMessageBuilder<T> extends Object implements io.cloudevents.fun.EventBuilder<T,io.cloudevents.v1.AttributesImpl>
-
-
Constructor Summary
Constructors Constructor Description CloudEventMessageBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CloudEventMessage<T>
build()
CloudEventMessage<T>
build(T data, io.cloudevents.v1.AttributesImpl attributes, Collection<io.cloudevents.extensions.ExtensionFormat> extensions)
static <T> CloudEventMessageBuilder<T>
from(Message<T> message)
CloudEventMessageBuilder<T>
withData(T data)
CloudEventMessageBuilder<T>
withDataContentType(String datacontenttype)
CloudEventMessageBuilder<T>
withDataschema(URI dataschema)
CloudEventMessageBuilder<T>
withExtension(io.cloudevents.extensions.ExtensionFormat extension)
CloudEventMessageBuilder<T>
withId(String id)
CloudEventMessageBuilder<T>
withSource(URI source)
CloudEventMessageBuilder<T>
withSubject(String subject)
CloudEventMessageBuilder<T>
withTime(ZonedDateTime time)
CloudEventMessageBuilder<T>
withType(String type)
-
-
-
Method Detail
-
from
public static <T> CloudEventMessageBuilder<T> from(Message<T> message)
-
withId
public CloudEventMessageBuilder<T> withId(String id)
-
withSource
public CloudEventMessageBuilder<T> withSource(URI source)
-
withType
public CloudEventMessageBuilder<T> withType(String type)
-
withDataschema
public CloudEventMessageBuilder<T> withDataschema(URI dataschema)
-
withDataContentType
public CloudEventMessageBuilder<T> withDataContentType(String datacontenttype)
-
withSubject
public CloudEventMessageBuilder<T> withSubject(String subject)
-
withTime
public CloudEventMessageBuilder<T> withTime(ZonedDateTime time)
-
withData
public CloudEventMessageBuilder<T> withData(T data)
-
withExtension
public CloudEventMessageBuilder<T> withExtension(io.cloudevents.extensions.ExtensionFormat extension)
-
build
public CloudEventMessage<T> build()
-
build
public CloudEventMessage<T> build(T data, io.cloudevents.v1.AttributesImpl attributes, Collection<io.cloudevents.extensions.ExtensionFormat> extensions)
- Specified by:
build
in interfaceio.cloudevents.fun.EventBuilder<T,io.cloudevents.v1.AttributesImpl>
-
-