-
- All Implemented Interfaces:
-
com.brightcove.ssai.tracking.TrackerDatasource
public class RemoteTrackerDatasource implements TrackerDatasource
Implementation of a TrackerDatasource that makes the network calls to track the specified TrackingEvents.
-
-
Method Summary
Modifier and Type Method Description static TrackerDatasource
create(@NonNull() HttpService httpService)
Instantiates a RemoteTrackerDatasource. void
track(@NonNull() List<TrackingEvent> trackingEvents, @NonNull() SSAICallback<List<TrackingEvent>> ssaiCallback)
Tries to contact the URI of each TrackingEvent and then notifies successful resultsin onSuccess, in case there were errors onError is called. -
-
Method Detail
-
create
static TrackerDatasource create(@NonNull() HttpService httpService)
Instantiates a RemoteTrackerDatasource.
- Parameters:
httpService
- a NonNull instance of HttpService.
-
track
void track(@NonNull() List<TrackingEvent> trackingEvents, @NonNull() SSAICallback<List<TrackingEvent>> ssaiCallback)
Tries to contact the URI of each TrackingEvent and then notifies successful resultsin onSuccess, in case there were errors onError is called.Notice that both onSuccess and onError can be called in the sametrack(List, SSAICallback) call.
- Parameters:
trackingEvents
- the list of tracking events to be tracked.ssaiCallback
- a callback to receive status of the tracking events.
-
-
-
-