Package com.selectpdf
Class AsyncJobClient
java.lang.Object
com.selectpdf.ApiClient
com.selectpdf.AsyncJobClient
public class AsyncJobClient extends ApiClient
Get the result of an asynchronous call.
-
Field Summary
Fields inherited from class com.selectpdf.ApiClient
apiAsyncEndpoint, apiEndpoint, apiWebElementsEndpoint, AsyncCallsMaxPings, AsyncCallsPingInterval, binaryData, CLIENT_VERSION, files, headers, jobId, lastHTTPCode, MULTIPART_FORM_DATA_BOUNDARY, NEW_LINE, numberOfPages, parameters
-
Constructor Summary
Constructors Constructor Description AsyncJobClient(java.lang.String apiKey, java.lang.String jobId)
Construct the async job client. -
Method Summary
Methods inherited from class com.selectpdf.ApiClient
getNumberOfPages, performPost, performPostAsMultipartFormData, serializeDictionary, serializeParameters, setApiAsyncEndpoint, setApiEndpoint, setApiWebElementsEndpoint, startAsyncJob, startAsyncJobMultipartFormData
-
Constructor Details
-
AsyncJobClient
public AsyncJobClient(java.lang.String apiKey, java.lang.String jobId)Construct the async job client.- Parameters:
apiKey
- API Key.jobId
- Job ID.
-
-
Method Details
-
getResult
public byte[] getResult()Get result of the asynchronous job.- Returns:
- Byte array containing the resulted file if the job is finished. Returns Null if the job is still running. Throws an exception if an error occurred.
-
finished
public java.lang.Boolean finished()Check if asynchronous job is finished.- Returns:
- True if job finished.
-