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.
  • 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.