public class BidRequestSender
extends java.lang.Object
| Constructor and Description |
|---|
BidRequestSender(CdbRequestFactory cdbRequestFactory,
RemoteConfigRequestFactory remoteConfigRequestFactory,
Clock clock,
PubSdkApi api,
java.util.concurrent.Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAllPendingTasks()
Attempt to cancel all pending tasks of bid request.
|
void |
sendBidRequest(java.util.List<com.criteo.publisher.model.CacheAdUnit> adUnits,
com.criteo.publisher.CdbCallListener listener)
Asynchronously send a bid request with the given requested ad units.
|
void |
sendRemoteConfigRequest(Config configToUpdate)
Asynchronously send a remote config request and update the given config.
|
public BidRequestSender(@NonNull
CdbRequestFactory cdbRequestFactory,
@NonNull
RemoteConfigRequestFactory remoteConfigRequestFactory,
@NonNull
Clock clock,
@NonNull
PubSdkApi api,
@NonNull
java.util.concurrent.Executor executor)
public void sendRemoteConfigRequest(@NonNull
Config configToUpdate)
If no error occurs during the request, the given configuration is updated. Else, it is left unchanged.
configToUpdate - configuration to update after requestpublic void sendBidRequest(@NonNull
java.util.List<com.criteo.publisher.model.CacheAdUnit> adUnits,
@NonNull
com.criteo.publisher.CdbCallListener listener)
The given listener is notified before and after the call was made.
When an ad unit is sent for request, it is considered as pending until the end of its request (successful or not). While an ad unit is pending, it cannot be requested again. So if in given ones, some are pending, they will be ignored from the request. If all given ad units are pending, then no call is done and listener is not notified.
adUnits - ad units to requestlistener - listener to notifypublic void cancelAllPendingTasks()