public abstract class AbstractEvent extends java.lang.Object implements Event
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractEvent.Builder<T extends AbstractEvent.Builder<T>> |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<SelfDescribingJson> |
context |
protected long |
deviceCreatedTimestamp |
protected java.lang.String |
eventId |
protected Subject |
subject |
protected java.lang.Long |
trueTimestamp
The true timestamp may be null if none is set.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEvent(AbstractEvent.Builder<?> builder) |
| Modifier and Type | Method and Description |
|---|---|
static AbstractEvent.Builder<?> |
builder() |
java.util.List<SelfDescribingJson> |
getContext() |
long |
getDeviceCreatedTimestamp() |
java.lang.String |
getEventId() |
abstract Payload |
getPayload() |
Subject |
getSubject() |
long |
getTimestamp()
Deprecated.
|
java.lang.Long |
getTrueTimestamp() |
protected TrackerPayload |
putDefaultParams(TrackerPayload payload)
Adds the default parameters to a TrackerPayload object.
|
protected final java.util.List<SelfDescribingJson> context
protected long deviceCreatedTimestamp
protected java.lang.Long trueTimestamp
protected final java.lang.String eventId
protected final Subject subject
protected AbstractEvent(AbstractEvent.Builder<?> builder)
public static AbstractEvent.Builder<?> builder()
public java.util.List<SelfDescribingJson> getContext()
getContext in interface Eventpublic long getTimestamp()
getTrueTimestamp() or getDeviceCreatedTimestamp()getTimestamp in interface Eventpublic long getDeviceCreatedTimestamp()
getDeviceCreatedTimestamp in interface Eventpublic java.lang.Long getTrueTimestamp()
getTrueTimestamp in interface Eventpublic java.lang.String getEventId()
getEventId in interface Eventpublic Subject getSubject()
getSubject in interface Eventpublic abstract Payload getPayload()
getPayload in interface Eventprotected TrackerPayload putDefaultParams(TrackerPayload payload)
payload - the payload to add too.