- Type Parameters:
T- type of the body of the event
- All Known Implementing Classes:
AbstractDataEvent
public interface DataEvent<T>
Represents top level data event structure that can be emitted from within
running process, decision or rule.
It's main aim is to be transferred over the wire but the event itself is not
meant to do transformation to be "wire-friendly"
Main point of the event is to be compatible with cloud events specification
and thus comes with main fields that the spec defines.
Classes implementing can provide more information to be considered extensions
of the event - see cloud event extension elements.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtension(String name, Object value) Stores extension attribute with given name and valuegetData()Returns actual body of the eventgetExtension(String name) Returns extension attribute with given nameReturns all extension attributes of the eventgetId()Returns unique id of the eventReturns source of the event that is in URI syntaxReturns specification version of the cloud eventReturns subject of the eventgetTime()Returns returns time when the event was createdgetType()Returns type of the event this instance represents e.g.
-
Field Details
-
SPEC_VERSION
- See Also:
-
-
Method Details
-
getSpecversion
String getSpecversion()Returns specification version of the cloud event- Returns:
- specification version
-
getId
String getId()Returns unique id of the event- Returns:
- unique event id
-
getType
String getType()Returns type of the event this instance represents e.g. ProcessInstanceEvent- Returns:
- type of the event
-
getSource
String getSource()Returns source of the event that is in URI syntax- Returns:
- uri source
-
getTime
String getTime()Returns returns time when the event was created- Returns:
- time of the event
-
getSubject
String getSubject()Returns subject of the event- Returns:
- subject
-
getData
T getData()Returns actual body of the event- Returns:
-
getExtensions
Returns all extension attributes of the event- Returns:
- extension attributes
-
addExtension
Stores extension attribute with given name and value- Parameters:
name- name of the attributevalue- value of the attribute
-
getExtension
Returns extension attribute with given name- Parameters:
name- name of the attribute- Returns:
- extension attribute value if exists otherwise null
-