public class DefaultTargetClient extends java.lang.Object implements TargetClient
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Attributes |
getAttributes(TargetDeliveryRequest targetRequest,
java.lang.String... mboxes)
Makes a getOffers() call and converts all returned JSON offers into Attributes.
|
java.util.concurrent.CompletableFuture<Attributes> |
getAttributesAsync(TargetDeliveryRequest targetRequest,
java.lang.String... mboxes)
Makes an async getOffers() call and converts all returned JSON offers into Attributes.
|
TargetDeliveryResponse |
getOffers(TargetDeliveryRequest request) |
java.util.concurrent.CompletableFuture<TargetDeliveryResponse> |
getOffersAsync(TargetDeliveryRequest request) |
ResponseStatus |
sendNotifications(TargetDeliveryRequest request) |
java.util.concurrent.CompletableFuture<ResponseStatus> |
sendNotificationsAsync(TargetDeliveryRequest request) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatepublic TargetDeliveryResponse getOffers(TargetDeliveryRequest request)
getOffers in interface TargetClientpublic java.util.concurrent.CompletableFuture<TargetDeliveryResponse> getOffersAsync(TargetDeliveryRequest request)
getOffersAsync in interface TargetClientpublic ResponseStatus sendNotifications(TargetDeliveryRequest request)
sendNotifications in interface TargetClientpublic java.util.concurrent.CompletableFuture<ResponseStatus> sendNotificationsAsync(TargetDeliveryRequest request)
sendNotificationsAsync in interface TargetClientpublic Attributes getAttributes(TargetDeliveryRequest targetRequest, java.lang.String... mboxes)
TargetClientgetAttributes in interface TargetClienttargetRequest - optional TargetDeliveryRequest that can be used to set specific request
items such as Visitor, Context, etc. If null, one will be generated. Request for given mbox
will be added automatically.mboxes - Name of mboxes to use to retrieve attributes.public java.util.concurrent.CompletableFuture<Attributes> getAttributesAsync(TargetDeliveryRequest targetRequest, java.lang.String... mboxes)
TargetClientgetAttributesAsync in interface TargetClienttargetRequest - optional TargetDeliveryRequest that can be used to set specific request
items such as Visitor, Context, etc. If null, one will be generated. Request for given mbox
will be added automatically.mboxes - Name of mboxes to use to retrieve attributes.public void close()
close in interface java.lang.AutoCloseable