Package ai.promoted.delivery.client
Class PromotedDeliveryClient
java.lang.Object
ai.promoted.delivery.client.PromotedDeliveryClient
PromotedDeliveryClient is the main class for interacting with the Promoted.ai Delivery API.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault timeout for delivery calls.static final intDefault number of maximum request insertion passed to Delivery API.static final intExecutor to run metrics logging in the background.static final longDefault timeout for metrics calls. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Builder access forPromotedDeliveryClientdeliver(DeliveryRequest deliveryRequest) Used to call Delivery API.booleanvoidsetPerformChecks(boolean performChecks)
-
Field Details
-
DEFAULT_DELIVERY_TIMEOUT_MILLIS
public static final long DEFAULT_DELIVERY_TIMEOUT_MILLISDefault timeout for delivery calls.- See Also:
-
DEFAULT_METRICS_TIMEOUT_MILLIS
public static final long DEFAULT_METRICS_TIMEOUT_MILLISDefault timeout for metrics calls.- See Also:
-
DEFAULT_METRICS_THREAD_POOL_SIZE
public static final int DEFAULT_METRICS_THREAD_POOL_SIZEExecutor to run metrics logging in the background.- See Also:
-
DEFAULT_MAX_REQUEST_INSERTIONS
public static final int DEFAULT_MAX_REQUEST_INSERTIONSDefault number of maximum request insertion passed to Delivery API.- See Also:
-
-
Method Details
-
deliver
Used to call Delivery API. Takes the given list of Content and ranks it.- Parameters:
deliveryRequest- the delivery request- Throws:
DeliveryException- when any exception occurs
-
isPerformChecks
public boolean isPerformChecks() -
setPerformChecks
public void setPerformChecks(boolean performChecks) -
builder
Builder access forPromotedDeliveryClient- Returns:
- the builder
-