Package com.casper.sdk.model.event
Interface Event<T>
-
public interface Event<T>The interface implemented by all events that are read from a nodes event stream
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetData()The event payload a JSON string or PojoDataTypegetDataType()The key name of the data field.EventTypegetEventType()The type of the eventjava.util.Optional<java.lang.Long>getId()The optional ID of the eventjava.lang.StringgetSource()The node URL that is the source of the eventjava.lang.StringgetVersion()Obtains the API version of the event
-
-
-
Method Detail
-
getSource
java.lang.String getSource()
The node URL that is the source of the event- Returns:
- the URL of the source node
-
getEventType
EventType getEventType()
The type of the event- Returns:
- the type of the event
-
getDataType
DataType getDataType()
The key name of the data field.- Returns:
- the key name of the data field
-
getData
T getData()
The event payload a JSON string or Pojo- Returns:
- the event payload
-
getId
java.util.Optional<java.lang.Long> getId()
The optional ID of the event- Returns:
- the optional ID
-
getVersion
java.lang.String getVersion()
Obtains the API version of the event- Returns:
- the API version
-
-