com.microsoft.bingads.internal.ParentCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microsoft.bingads Show documentation
Show all versions of microsoft.bingads Show documentation
The Bing Ads Java SDK is a library improving developer experience when working with the Bing Ads services by providing high-level access to features such as Bulk API, OAuth Authorization and SOAP API.
package com.microsoft.bingads.internal;
import com.microsoft.bingads.AsyncCallback;
import java.util.concurrent.Future;
/**
* Reserved for internal use.
* @param
*/
public class ParentCallback implements AsyncCallback {
private final ResultFuture> parentResultFuture;
public ParentCallback(ResultFuture> parentResultFuture) {
this.parentResultFuture = parentResultFuture;
}
public void onSuccess(T result) throws Exception {
}
@Override
public void onCompleted(Future result) {
try {
onSuccess(result.get());
}
catch (Throwable e) {
parentResultFuture.setException(e);
}
}
}