Package com.sap.cds.services.messaging
Interface CloudEventMessageEventContext
- All Superinterfaces:
EventContext
Describes the content of a CloudEvents structured message
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newCloudEventMessageEventContext
getData()
getId()
The ID identifies the event.The source identifies the instance the event originated in.getTime()
getType()
void
void
setDataContentType
(String dataContentType) void
setDataSchema
(String dataSchema) void
The ID identifies the event.void
The source identifies the instance the event originated in.void
setSpecVersion
(String specVersion) void
setSubject
(String subject) void
void
Methods inherited from interface com.sap.cds.services.EventContext
as, get, getAuthenticationInfo, getCdsRuntime, getChangeSetContext, getEvent, getFeatureTogglesInfo, getMessages, getModel, getParameterInfo, getService, getServiceCatalog, getTarget, getUserInfo, isCompleted, keySet, put, setCompleted
-
Method Details
-
create
Creates a newCloudEventMessageEventContext
- Parameters:
event
- the unqualified event name of the modelled event- Returns:
- the
CloudEventMessageEventContext
-
getId
String getId()The ID identifies the event.- Returns:
- the identifier
-
setId
The ID identifies the event.- Parameters:
id
- the identifier
-
getSpecVersion
- Returns:
- The version of the CloudEvents specification which the event uses.
-
setSpecVersion
- Parameters:
specVersion
- The version of the CloudEvents specification which the event uses.
-
getSource
String getSource()The source identifies the instance the event originated in. The instance is an uniquely identifiable instance of a service or application including the tenant if a tenant concept is present.- Returns:
- the source
-
setSource
The source identifies the instance the event originated in. The instance is an uniquely identifiable instance of a service or application including the tenant if a tenant concept is present.- Parameters:
source
- the source
-
getType
String getType()- Returns:
- the type of the event related to the source the event originated in.
-
setType
- Parameters:
type
- the type of the event related to the source the event originated in.
-
getSubject
String getSubject()- Returns:
- the subject of the event in the context of the source the event originated in (e.g. a certain business object or resource).
-
setSubject
- Parameters:
subject
- the subject of the event in the context of the source the event originated in (e.g. a certain business object or resource).
-
getDataContentType
- Returns:
- Content type of the event data.
- See Also:
-
setDataContentType
- Parameters:
dataContentType
- Content type of the event data- See Also:
-
getDataSchema
- Returns:
- the schema that the event data adheres to.
- See Also:
-
setDataSchema
- Parameters:
dataSchema
- the schema that the event data adheres to.- See Also:
-
getTime
Instant getTime()- Returns:
- Timestamp of when the occurrence happened.
-
setTime
- Parameters:
time
- Timestamp of when the occurrence happened.
-
getData
- Returns:
- The data (payload) of the event.
-
setData
- Parameters:
data
- The data (payload) of the event.
-