java.lang.Object
io.automatiko.engine.api.event.AbstractDataEvent<T>
- Type Parameters:
T- the payload
- All Implemented Interfaces:
DataEvent<T>
This is an abstract implementation of the
DataEvent that contains
basic common attributes referring to automatiko processes metadata. This class
can be extended mainly by Services that need to publish events to be indexed
by the Data-Index service.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Tprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected StringFields inherited from interface io.automatiko.engine.api.event.DataEvent
SPEC_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDataEvent(String specversion, String id, String source, String type, String subject, String time, String datacontenttype, T data) AbstractDataEvent(String specversion, String id, String source, String type, String subject, String time, T data) AbstractDataEvent(String type, String source, T body) -
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
-
specversion
-
id
-
source
-
type
-
time
-
subject
-
datacontenttype
-
data
-
extensions
-
-
Constructor Details
-
AbstractDataEvent
-
AbstractDataEvent
-
AbstractDataEvent
-
-
Method Details
-
getSource
Description copied from interface:DataEventReturns source of the event that is in URI syntax -
getSpecversion
Description copied from interface:DataEventReturns specification version of the cloud event- Specified by:
getSpecversionin interfaceDataEvent<T>- Returns:
- specification version
-
getSubject
Description copied from interface:DataEventReturns subject of the event- Specified by:
getSubjectin interfaceDataEvent<T>- Returns:
- subject
-
getId
Description copied from interface:DataEventReturns unique id of the event -
getType
Description copied from interface:DataEventReturns type of the event this instance represents e.g. ProcessInstanceEvent -
getTime
Description copied from interface:DataEventReturns returns time when the event was created -
getData
Description copied from interface:DataEventReturns actual body of the event -
getExtensions
Description copied from interface:DataEventReturns all extension attributes of the event- Specified by:
getExtensionsin interfaceDataEvent<T>- Returns:
- extension attributes
-
addExtension
Description copied from interface:DataEventStores extension attribute with given name and value- Specified by:
addExtensionin interfaceDataEvent<T>- Parameters:
name- name of the attributevalue- value of the attribute
-
getExtension
Description copied from interface:DataEventReturns extension attribute with given name- Specified by:
getExtensionin interfaceDataEvent<T>- Parameters:
name- name of the attribute- Returns:
- extension attribute value if exists otherwise null
-