Class Triggers
java.lang.Object
com.brightcove.ssai.tracking.timed.Triggers
Contains helper static methods related to
TimedTrackingTrigger.-
Method Summary
Modifier and TypeMethodDescriptionstatic List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger>create(EventEmitter eventEmitter) Crates theTimedTrackingTriggers of the supportedTrackingEvents.static voidemitTrackingEvent(EventEmitter eventEmitter, List<TrackingEvent> trackingEvents, Ad<?> ad, TrackingType trackingType) Helper method to emit eachTrackingEventfrom a list.static booleanisValueInBetween(long value, long min, long max) Checks whether a value is in between the min and the max.
-
Method Details
-
create
public static List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> create(@NonNull EventEmitter eventEmitter) Crates theTimedTrackingTriggers of the supportedTrackingEvents.- Returns:
- A
Listof theTimedTrackingTriggers
-
isValueInBetween
public static boolean isValueInBetween(long value, long min, long max) Checks whether a value is in between the min and the max. The min value is inclusive and the max value is exclusive, in fewer words [min, max).- Parameters:
value- the value to check.min- the minimum value.max- the maximum value.- Returns:
- true if value is in between [min, max], false otherwise.
-
emitTrackingEvent
public static void emitTrackingEvent(@NonNull EventEmitter eventEmitter, @NonNull List<TrackingEvent> trackingEvents, @NonNull Ad<?> ad, @NonNull TrackingType trackingType) Helper method to emit eachTrackingEventfrom a list.- Parameters:
eventEmitter- EventEmitter used to emit the TrackingEvents.trackingEvents- TrackingEvents to be emitted.ad- The ad being tracked.trackingType- The tracking type for this event.
-