public class Event
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
eventData |
protected java.lang.String |
eventStoreId |
protected java.lang.String |
reservedPrefix |
| Constructor and Description |
|---|
Event(java.util.Map<java.lang.String,java.lang.Object> eventData)
Create a new event to push to Connect.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.Iterable<Event>> |
buildEventBatch(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>[]> events) |
static Event |
fromEventStore(java.lang.String eventJSON,
java.lang.String eventStoreId) |
java.util.Map<java.lang.String,java.lang.Object> |
getEventData()
Get the properties of the event.
|
java.lang.String |
getEventJSON()
Get the properties of the event as a JSON string.
|
java.lang.String |
getEventStoreId()
Gets the ID used for storing the event in the event store.
|
java.lang.String |
getId()
Get the ID of the event.
|
static java.lang.String |
getJSONForEventBatch(java.util.Map<java.lang.String,java.lang.Iterable<Event>> eventBatch) |
protected void |
setDefaultProperties() |
protected void |
validateProperties() |
protected final java.lang.String reservedPrefix
protected final java.util.Map<java.lang.String,java.lang.Object> eventData
protected java.lang.String eventStoreId
public Event(java.util.Map<java.lang.String,java.lang.Object> eventData)
throws InvalidEventException
String and Date respectively.
If you do not provide an "id", one will be generated for you. If you do not provide a "timestamp", the current date is used.eventData - A Map containing the event properties to push to Connect.InvalidEventExceptionpublic static Event fromEventStore(java.lang.String eventJSON, java.lang.String eventStoreId)
public java.util.Map<java.lang.String,java.lang.Object> getEventData()
Map containing the event properties.public java.lang.String getEventJSON()
public java.lang.String getId()
String containing the event ID.public java.lang.String getEventStoreId()
protected void setDefaultProperties()
protected void validateProperties()
throws InvalidEventException
InvalidEventExceptionpublic static java.util.Map<java.lang.String,java.lang.Iterable<Event>> buildEventBatch(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>[]> events) throws InvalidEventException
InvalidEventExceptionpublic static java.lang.String getJSONForEventBatch(java.util.Map<java.lang.String,java.lang.Iterable<Event>> eventBatch)