Class ResumableUploadCallable<RequestT,ResponseT>

java.lang.Object
com.google.api.gax.rpc.ResumableUploadCallable<RequestT,ResponseT>
Type Parameters:
RequestT - the type of the initial request message that initiates the upload session
ResponseT - the type of the final response message returned once the upload completes
Direct Known Subclasses:
ResumableUploadCallableImpl

@BetaApi @NullMarked public abstract class ResumableUploadCallable<RequestT,ResponseT> extends Object
A ResumableUploadCallable is an API-transport-independent wrapper for the Resumable Upload protocol. Operates directly on the request object and input stream payload.
  • Constructor Details

    • ResumableUploadCallable

      protected ResumableUploadCallable()
  • Method Details

    • futureCall

      public ResumableUploadFuture<ResponseT> futureCall(RequestT request, InputStream payload, @Nullable ResumableUploadCallSettings settings)
      Performs a new resumable upload asynchronously with settings overrides and default call context.

      The provided payload stream is consumed asynchronously by the returned ResumableUploadFuture and will be closed automatically upon completion, failure, or cancellation.

      Parameters:
      request - the request message
      payload - the data payload input stream to upload and close
      settings - request-level call settings overrides; may be null
      Returns:
      future for tracking and controlling the upload
    • futureCall

      public abstract ResumableUploadFuture<ResponseT> futureCall(RequestT request, InputStream payload, @Nullable ApiCallContext context, @Nullable ResumableUploadCallSettings settings)
      Performs a new resumable upload asynchronously with call context and settings overrides.

      The provided payload stream is consumed asynchronously by the returned ResumableUploadFuture and will be closed automatically upon completion, failure, or cancellation.

      Parameters:
      request - the request message
      payload - the data payload input stream to upload and close
      context - call context overrides; may be null
      settings - request-level call settings overrides; may be null
      Returns:
      future for tracking and controlling the upload
    • resumeCall

      public abstract ResumableUploadFuture<ResponseT> resumeCall(String sessionUrl, InputStream payload, @Nullable ResumableUploadCallSettings settings)
      Resumes an existing resumable upload session asynchronously using a saved session URL.

      The provided payload stream is consumed asynchronously by the returned ResumableUploadFuture and will be closed automatically upon completion, failure, or cancellation.

      Parameters:
      sessionUrl - the upload session URL
      payload - the data payload input stream to upload and close
      settings - call settings overrides; may be null
      Returns:
      future for tracking and controlling the upload