T - generic type of the underlying data field.CloudEvent<T>, java.io.Serializablepublic class DefaultCloudEventImpl<T> extends java.lang.Object implements CloudEvent<T>, java.io.Serializable
| Constructor | Description |
|---|---|
DefaultCloudEventImpl(java.lang.String eventType,
java.lang.String cloudEventsVersion,
java.net.URI source,
java.lang.String eventID,
java.lang.String eventTypeVersion,
java.time.ZonedDateTime eventTime,
java.net.URI schemaURL,
java.lang.String contentType,
java.util.Map extensions,
T data) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getCloudEventsVersion() |
The version of the CloudEvents specification which the event uses.
|
java.util.Optional<java.lang.String> |
getContentType() |
Describe the data encoding format
|
java.util.Optional<T> |
getData() |
The event payload.
|
java.lang.String |
getEventID() |
ID of the event.
|
java.util.Optional<java.time.ZonedDateTime> |
getEventTime() |
Timestamp of when the event happened.
|
java.lang.String |
getEventType() |
Type of occurrence which has happened.
|
java.util.Optional<java.lang.String> |
getEventTypeVersion() |
The version of the eventType.
|
java.util.Optional<java.util.Map> |
getExtensions() |
This is for additional metadata and this does not have a mandated structure.
|
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.
|
public DefaultCloudEventImpl(java.lang.String eventType,
java.lang.String cloudEventsVersion,
java.net.URI source,
java.lang.String eventID,
java.lang.String eventTypeVersion,
java.time.ZonedDateTime eventTime,
java.net.URI schemaURL,
java.lang.String contentType,
java.util.Map extensions,
T data)
public java.lang.String getCloudEventsVersion()
CloudEventgetCloudEventsVersion in interface CloudEvent<T>public java.util.Optional<java.util.Map> getExtensions()
CloudEventgetExtensions in interface CloudEvent<T>public java.lang.String getEventType()
CloudEventgetEventType in interface CloudEvent<T>public java.net.URI getSource()
CloudEventgetSource in interface CloudEvent<T>public java.lang.String getEventID()
CloudEventgetEventID in interface CloudEvent<T>public java.util.Optional<java.lang.String> getEventTypeVersion()
CloudEventgetEventTypeVersion in interface CloudEvent<T>public java.util.Optional<java.time.ZonedDateTime> getEventTime()
CloudEventgetEventTime 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>Copyright © 2018. All Rights Reserved.