T - generic type of the underlying data field.public class DefaultCloudEventImpl<T> extends java.lang.Object implements CloudEvent<T>, java.io.Serializable
| Constructor and Description |
|---|
DefaultCloudEventImpl(java.lang.String type,
java.lang.String specversion,
java.net.URI source,
java.lang.String id,
java.time.ZonedDateTime time,
java.net.URI schemaURL,
java.lang.String contentType,
T data,
java.util.List<Extension> extensions) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.String> |
getContentType()
Describe the data encoding format
|
java.util.Optional<T> |
getData()
The event payload.
|
java.util.Optional<java.util.List<Extension>> |
getExtensions() |
java.lang.String |
getId()
ID of the event.
|
java.util.Optional<java.net.URI> |
getSchemaURL()
A link to the schema that the data attribute adheres to.
|
java.net.URI |
getSource()
This describes the event producer.
|
java.lang.String |
getSpecVersion()
The version of the CloudEvents specification which the event uses.
|
java.util.Optional<java.time.ZonedDateTime> |
getTime()
Timestamp of when the event happened.
|
java.lang.String |
getType()
Type of occurrence which has happened.
|
java.lang.String |
toString() |
public java.lang.String getSpecVersion()
CloudEventgetSpecVersion in interface CloudEvent<T>public java.lang.String getType()
CloudEventgetType in interface CloudEvent<T>public java.net.URI getSource()
CloudEventgetSource in interface CloudEvent<T>public java.lang.String getId()
CloudEventgetId in interface CloudEvent<T>public java.util.Optional<java.time.ZonedDateTime> getTime()
CloudEventgetTime in interface CloudEvent<T>public java.util.Optional<java.net.URI> getSchemaURL()
CloudEventgetSchemaURL in interface CloudEvent<T>public java.util.Optional<java.lang.String> getContentType()
CloudEventgetContentType in interface CloudEvent<T>public java.util.Optional<T> getData()
CloudEventgetData in interface CloudEvent<T>public java.util.Optional<java.util.List<Extension>> getExtensions()
getExtensions in interface CloudEvent<T>public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.