Class EventPayload
java.lang.Object
com.inductiveautomation.eventstream.EventPayload
Combines EventStreamSource event data with the events metadata. Data must be included in all
EventPayloads, while metadata is optional. Encodings specified in Source and Transform
configuration are only applied to data, not metadata. Metadata is used to pass additional information to the
Event Stream that a user might find useful. An example is the Kafka Source, the value from received record would be
considered data and the partition, offset, key, and additional headers would be metadata.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating EventPayload.static class -
Method Summary
Modifier and TypeMethodDescriptionstatic EventPayload.Builderstatic EventPayloadCreates anEventPayloadwith no metadata.getData()replacePayload(Object data) Replaces EventPayload data, keeping the old metadata the same.
-
Method Details
-
from
Creates anEventPayloadwith no metadata.- Parameters:
data- Event data- Returns:
EventPayloadwith no metadata.
-
builder
-
getData
- Returns:
- Data associated with event
-
getMetadata
- Returns:
- Metadata associated with event
-
replacePayload
Replaces EventPayload data, keeping the old metadata the same.- Parameters:
data- New data to set on EventPayload- Returns:
- EventPayload with new data and previous metadata
-