Package com.google.genai.gaos.operations
Class Operations
java.lang.Object
com.google.genai.gaos.operations.Operations
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBase interface for all async operationsstatic interfaceInterface for async operations that don't require a request parameterstatic interfaceInterface for async operations that require a request parameterstatic final classRelays cancellation of the future returned to the SDK user to the in-flight HTTP call, releasing its connection.static interfaceBase interface for all operationsstatic interfaceInterface for operations that don't require a request parameterstatic interfaceInterface for operations that require a request parameter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<T>applyBodyReadAsync(CompletableFuture<HttpResponse<InputStream>> transportFuture, Function<HttpResponse<InputStream>, T> handler) Runs blocking response-body reading and parsing away from the thread that completed the transport future.static <T> CompletableFuture<T>relayCancel(CompletableFuture<T> future, Operations.AsyncOperation<?> operation) Makes cancellingfuturecancel the operation's in-flight HTTP call.static Executor
-
Constructor Details
-
Operations
public Operations()
-
-
Method Details
-
relayCancel
public static <T> CompletableFuture<T> relayCancel(CompletableFuture<T> future, Operations.AsyncOperation<?> operation) Makes cancellingfuturecancel the operation's in-flight HTTP call. -
streamCompletionExecutor
-
applyBodyReadAsync
public static <T> CompletableFuture<T> applyBodyReadAsync(CompletableFuture<HttpResponse<InputStream>> transportFuture, Function<HttpResponse<InputStream>, T> handler) Runs blocking response-body reading and parsing away from the thread that completed the transport future.
-