TStatus
- type of bulk operation status is being trackedpublic abstract class BulkOperation<TStatus> extends Object
BulkDownloadOperation
or BulkUploadOperation
derived class to poll for the operation status, and then download the results file when available.Modifier and Type | Method and Description |
---|---|
Future<File> |
downloadResultFileAsync(File localResultDirectoryName,
String localResultFileName,
boolean decompress,
AsyncCallback<File> callback)
Downloads and optionally decompress the result file from the bulk operation
|
Future<File> |
downloadResultFileAsync(File localResultDirectoryName,
String localResultFileName,
boolean decompress,
boolean overwrite,
AsyncCallback<File> callback)
Downloads and optionally decompress the result file from the bulk operation, allows to overwrite the local result file.
|
AuthorizationData |
getAuthorizationData() |
int |
getDownloadHttpTimeoutInMilliseconds()
Gets the timeout of HttpClient download operation.
|
String |
getRequestId() |
Future<BulkOperationStatus<TStatus>> |
getStatusAsync(AsyncCallback<BulkOperationStatus<TStatus>> callback)
Gets the status of the bulk operation.
|
int |
getStatusPollIntervalInMilliseconds()
Gets the time interval in milliseconds between two status polling attempts.
|
String |
getTrackingId() |
void |
setDownloadHttpTimeoutInMilliseconds(int downloadHttpTimeoutInMilliseconds)
Sets the timeout of HttpClient download operation.
|
void |
setStatusPollIntervalInMilliseconds(int statusPollIntervalInMilliseconds)
Sets the time interval in milliseconds between two status polling attempts.
|
Future<BulkOperationStatus<TStatus>> |
trackAsync(AsyncCallback<BulkOperationStatus<TStatus>> callback)
Runs asynchronously until the bulk service has finished processing the bulk operation.
|
Future<BulkOperationStatus<TStatus>> |
trackAsync(Progress<BulkOperationProgressInfo> progress,
AsyncCallback<BulkOperationStatus<TStatus>> callback)
Runs asynchronously until the bulk service has finished processing the bulk operation.
|
public Future<BulkOperationStatus<TStatus>> trackAsync(AsyncCallback<BulkOperationStatus<TStatus>> callback)
callback
- A handler that will be called with the BulkOperation when it has completedpublic Future<BulkOperationStatus<TStatus>> trackAsync(Progress<BulkOperationProgressInfo> progress, AsyncCallback<BulkOperationStatus<TStatus>> callback)
progress
- An object to be updated with the progress of the operationcallback
- A handler that will be called with the BulkOperation when it has completedpublic Future<BulkOperationStatus<TStatus>> getStatusAsync(AsyncCallback<BulkOperationStatus<TStatus>> callback)
public AuthorizationData getAuthorizationData()
public String getRequestId()
public String getTrackingId()
public int getStatusPollIntervalInMilliseconds()
public void setStatusPollIntervalInMilliseconds(int statusPollIntervalInMilliseconds)
public int getDownloadHttpTimeoutInMilliseconds()
public void setDownloadHttpTimeoutInMilliseconds(int downloadHttpTimeoutInMilliseconds)
public Future<File> downloadResultFileAsync(File localResultDirectoryName, String localResultFileName, boolean decompress, AsyncCallback<File> callback) throws IOException, URISyntaxException
localResultDirectoryName
- the directory to place the result file inlocalResultFileName
- the name to use for final result filedecompress
- indicates whether the result file should be unzippedcallback
- AsyncCallback
object with File
File
object pointing to the result file wrapped in FutureIOException
URISyntaxException
public Future<File> downloadResultFileAsync(File localResultDirectoryName, String localResultFileName, boolean decompress, boolean overwrite, AsyncCallback<File> callback) throws IOException, URISyntaxException
localResultDirectoryName
- the directory to place the result file inlocalResultFileName
- the name to use for final result filedecompress
- indicates whether the result file should be unzippedoverwrite
- indicates whether can overwrite if target file existscallback
- AsyncCallback
object with File
File
object pointing to the result file wrapped in FutureIOException
URISyntaxException
Copyright © 2024. All rights reserved.