Class ResumableUploadCallable<RequestT,ResponseT> (2.91.0)

public abstract class ResumableUploadCallable<RequestT,ResponseT>

A ResumableUploadCallable is an API-transport-independent wrapper for the Resumable Upload protocol. Operates directly on the request object and input stream payload.

Inheritance

java.lang.Object > ResumableUploadCallable<RequestT,ResponseT>

Type Parameters

Name Description
RequestT
ResponseT

Constructors

ResumableUploadCallable()

protected ResumableUploadCallable()

Methods

futureCall(RequestT request, InputStreamSupplier payloadSupplier, @Nullable ApiCallContext context, @Nullable ResumableUploadOptions options)

public abstract ResumableUploadFuture<ResponseT> futureCall(RequestT request, InputStreamSupplier payloadSupplier, @Nullable ApiCallContext context, @Nullable ResumableUploadOptions options)

Performs a new resumable upload asynchronously with call context and options overrides.

Streams from the provided payloadSupplier are consumed asynchronously by the returned ResumableUploadFuture and will be closed automatically upon completion, failure, or cancellation.

Parameters
Name Description
request RequestT

the request message

payloadSupplier InputStreamSupplier

supplier of the data payload input stream to upload and close

context @org.jspecify.annotations.Nullable com.google.api.gax.rpc.ApiCallContext

call context overrides; may be null

options @org.jspecify.annotations.Nullable com.google.api.gax.rpc.ResumableUploadOptions

request-level upload options overrides; may be null

Returns
Type Description
ResumableUploadFuture<ResponseT>

future for tracking and controlling the upload

futureCall(RequestT request, InputStreamSupplier payloadSupplier, @Nullable ResumableUploadOptions options)

public ResumableUploadFuture<ResponseT> futureCall(RequestT request, InputStreamSupplier payloadSupplier, @Nullable ResumableUploadOptions options)

Performs a new resumable upload asynchronously with options overrides and default call context.

Streams from the provided payloadSupplier are consumed asynchronously by the returned ResumableUploadFuture and will be closed automatically upon completion, failure, or cancellation.

Parameters
Name Description
request RequestT

the request message

payloadSupplier InputStreamSupplier

supplier of the data payload input stream to upload and close

options @org.jspecify.annotations.Nullable com.google.api.gax.rpc.ResumableUploadOptions

request-level upload options overrides; may be null

Returns
Type Description
ResumableUploadFuture<ResponseT>

future for tracking and controlling the upload

resumeCall(String sessionUrl, InputStreamSupplier payloadSupplier, @Nullable ResumableUploadOptions options)

public abstract ResumableUploadFuture<ResponseT> resumeCall(String sessionUrl, InputStreamSupplier payloadSupplier, @Nullable ResumableUploadOptions options)

Resumes an existing resumable upload session asynchronously using a saved session URL.

Resuming queries the server for the last committed byte offset and skips the stream forward to that offset before resuming chunk transmission. payloadSupplier must supply a stream positioned at byte 0 of the original payload.

Streams from the provided payloadSupplier are consumed asynchronously by the returned ResumableUploadFuture and will be closed automatically upon completion, failure, or cancellation.

Parameters
Name Description
sessionUrl String

the upload session URL

payloadSupplier InputStreamSupplier

supplier of the data payload input stream to upload and close

options @org.jspecify.annotations.Nullable com.google.api.gax.rpc.ResumableUploadOptions

upload options overrides; may be null

Returns
Type Description
ResumableUploadFuture<ResponseT>

future for tracking and controlling the upload