Package de.espirit.firstspirit.event
Class TrackingEvent
java.lang.Object
de.espirit.firstspirit.event.TrackingEvent
- All Implemented Interfaces:
Serializable
This kind of event is thrown whenever a tracking point has been hit, e.g. with
TrackingAgent.track(UUID, String, String)
.
In order to listen to these events, use the EventBusAgent
along with the identifier
specified by BUS_IDENTIFIER
.
- Since:
- 5.2.220703
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BusIdentifier<TrackingEvent>
Use this bus identifier for registering listeners with theEventBusAgent
in order to receive tracking events. -
Constructor Summary
ConstructorDescriptionTrackingEvent
(@NotNull UUID uuid, @NotNull Instant timestamp, long count, @Nullable String category, @Nullable String label) Creates a new immutable tracking event without payload data.TrackingEvent
(@NotNull UUID uuid, @NotNull Instant timestamp, long count, @Nullable String category, @Nullable String label, @Nullable String value) Creates a new immutable tracking event. -
Method Summary
Modifier and TypeMethodDescriptionReturns the category to group tracking points by, if availablelong
getCount()
Returns the number of occurrences for this event.getLabel()
Returns human-readable label of the tracking point, if available@NotNull Instant
Returns the timestamp when the tracking point has been hit.@NotNull UUID
getUuid()
Returns the unique id of the tracking point which has been hit.getValue()
Returns the payload data of the tracking point, if available
-
Field Details
-
BUS_IDENTIFIER
Use this bus identifier for registering listeners with theEventBusAgent
in order to receive tracking events.- Since:
- 5.2.220703
-
-
Constructor Details
-
TrackingEvent
public TrackingEvent(@NotNull @NotNull UUID uuid, @NotNull @NotNull Instant timestamp, long count, @Nullable @Nullable String category, @Nullable @Nullable String label) Creates a new immutable tracking event without payload data.- Parameters:
uuid
- the unique id of the tracking point which has been hittimestamp
- the timestamp when the tracking point has been hitcount
- the number of occurrencescategory
- the category to group tracking points by, may benull
if unavailablelabel
- the human-readable label of the tracking point, may benull
if unavailable- Since:
- 5.2.220703
-
TrackingEvent
public TrackingEvent(@NotNull @NotNull UUID uuid, @NotNull @NotNull Instant timestamp, long count, @Nullable @Nullable String category, @Nullable @Nullable String label, @Nullable @Nullable String value) Creates a new immutable tracking event.- Parameters:
uuid
- the unique id of the tracking point which has been hittimestamp
- the timestamp when the tracking point has been hitcount
- the number of occurrencescategory
- the category to group tracking points by, may benull
if unavailablelabel
- the human-readable label of the tracking point, may benull
if unavailablevalue
- the payload data, may benull
- Since:
- 5.2.220805
-
-
Method Details
-
getUuid
Returns the unique id of the tracking point which has been hit.- Returns:
- the unique id of the tracking point, never
null
. - Since:
- 5.2.220703
-
getTimestamp
Returns the timestamp when the tracking point has been hit.- Returns:
- the timestamp, never
null
. - Since:
- 5.2.220703
-
getCount
public long getCount()Returns the number of occurrences for this event.- Returns:
- the number of occurrences
- Since:
- 5.2.220703
-
getCategory
Returns the category to group tracking points by, if available- Returns:
- the category to group tracking points by
- Since:
- 5.2.220703
-
getLabel
Returns human-readable label of the tracking point, if available- Returns:
- the human-readable label of the tracking point
- Since:
- 5.2.220703
-
getValue
Returns the payload data of the tracking point, if available- Returns:
- the payload data of the tracking point
- Since:
- 5.2.220805
-