public class CloudEventImpl<T> extends Object implements CloudEvent<T>, Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
CLOUD_EVENTS_VERSION_KEY |
static String |
CONTENT_TYPE_KEY |
static String |
DATA_KEY |
static String |
EVENT_ID_KEY |
static String |
EVENT_TIME_KEY |
static String |
EVENT_TYPE_KEY |
static String |
EVENT_TYPE_VERSION_KEY |
static String |
EXTENSIONS_KEY |
static String |
SCHEMA_URL_KEY |
static String |
SOURCE_KEY |
| Constructor and Description |
|---|
CloudEventImpl(String eventType,
String cloudEventsVersion,
URI source,
String eventID,
String eventTypeVersion,
ZonedDateTime eventTime,
URI schemaURL,
String contentType,
Map extensions,
T data) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,? super Object> |
getAttributes() |
String |
getCloudEventsVersion()
The version of the CloudEvents specification which the event uses.
|
Optional<String> |
getContentType()
Describe the data encoding format
|
Optional<T> |
getData()
The event payload.
|
String |
getEventID()
ID of the event.
|
Optional<ZonedDateTime> |
getEventTime()
Timestamp of when the event happened.
|
String |
getEventType()
Type of occurrence which has happened.
|
Optional<String> |
getEventTypeVersion()
The version of the eventType.
|
Optional<Map> |
getExtensions()
This is for additional metadata and this does not have a mandated structure.
|
Optional<URI> |
getSchemaURL()
A link to the schema that the data attribute adheres to.
|
URI |
getSource()
This describes the event producer.
|
void |
setData(T data) |
String |
toString() |
public static final String EVENT_TYPE_KEY
public static final String CLOUD_EVENTS_VERSION_KEY
public static final String SOURCE_KEY
public static final String EVENT_ID_KEY
public static final String EVENT_TYPE_VERSION_KEY
public static final String EVENT_TIME_KEY
public static final String SCHEMA_URL_KEY
public static final String CONTENT_TYPE_KEY
public static final String EXTENSIONS_KEY
public static final String DATA_KEY
public String getEventType()
CloudEventgetEventType in interface CloudEvent<T>public String getCloudEventsVersion()
CloudEventgetCloudEventsVersion in interface CloudEvent<T>public URI getSource()
CloudEventgetSource in interface CloudEvent<T>public String getEventID()
CloudEventgetEventID in interface CloudEvent<T>public Optional<String> getEventTypeVersion()
CloudEventgetEventTypeVersion in interface CloudEvent<T>public Optional<ZonedDateTime> getEventTime()
CloudEventgetEventTime in interface CloudEvent<T>public Optional<URI> getSchemaURL()
CloudEventgetSchemaURL in interface CloudEvent<T>public Optional<String> getContentType()
CloudEventgetContentType in interface CloudEvent<T>public Optional<Map> getExtensions()
CloudEventgetExtensions in interface CloudEvent<T>public Optional<T> getData()
CloudEventgetData in interface CloudEvent<T>public void setData(T data)
Copyright © 2018 JBoss by Red Hat. All rights reserved.