@BetaApi public class Callables extends Object
The callable objects wrap a given direct callable with features like retry and exception translation.
| Modifier and Type | Method and Description |
|---|---|
static <RequestT,ResponseT> |
batching(UnaryCallable<RequestT,ResponseT> innerCallable,
BatchingCallSettings<RequestT,ResponseT> batchingCallSettings,
ClientContext context)
Create a callable object that represents a batching API method.
|
static <RequestT,ResponseT,MetadataT> |
longRunningOperation(UnaryCallable<RequestT,OperationSnapshot> initialCallable,
OperationCallSettings<RequestT,ResponseT,MetadataT> operationCallSettings,
ClientContext clientContext,
LongRunningClient longRunningClient)
Creates a callable object that represents a long-running operation.
|
static <RequestT,ResponseT,PagedListResponseT> |
paged(UnaryCallable<RequestT,ResponseT> innerCallable,
PagedCallSettings<RequestT,ResponseT,PagedListResponseT> pagedCallSettings)
Create a paged callable object that represents a paged API method.
|
static <RequestT,ResponseT> |
retrying(ServerStreamingCallable<RequestT,ResponseT> innerCallable,
ServerStreamingCallSettings<RequestT,ResponseT> callSettings,
ClientContext clientContext) |
static <RequestT,ResponseT> |
retrying(UnaryCallable<RequestT,ResponseT> innerCallable,
UnaryCallSettings<?,?> callSettings,
ClientContext clientContext) |
static <RequestT,ResponseT> |
watched(ServerStreamingCallable<RequestT,ResponseT> callable,
ServerStreamingCallSettings<RequestT,ResponseT> callSettings,
ClientContext clientContext) |
public static <RequestT,ResponseT> UnaryCallable<RequestT,ResponseT> retrying(UnaryCallable<RequestT,ResponseT> innerCallable, UnaryCallSettings<?,?> callSettings, ClientContext clientContext)
@BetaApi(value="The surface for streaming is not stable yet and may change in the future.") public static <RequestT,ResponseT> ServerStreamingCallable<RequestT,ResponseT> retrying(ServerStreamingCallable<RequestT,ResponseT> innerCallable, ServerStreamingCallSettings<RequestT,ResponseT> callSettings, ClientContext clientContext)
@BetaApi(value="The surface for streaming is not stable yet and may change in the future.") public static <RequestT,ResponseT> ServerStreamingCallable<RequestT,ResponseT> watched(ServerStreamingCallable<RequestT,ResponseT> callable, ServerStreamingCallSettings<RequestT,ResponseT> callSettings, ClientContext clientContext)
@BetaApi(value="The surface for batching is not stable yet and may change in the future.") public static <RequestT,ResponseT> UnaryCallable<RequestT,ResponseT> batching(UnaryCallable<RequestT,ResponseT> innerCallable, BatchingCallSettings<RequestT,ResponseT> batchingCallSettings, ClientContext context)
innerCallable - the callable to issue callsbatchingCallSettings - BatchingSettings to configure the batching related settings
with.context - ClientContext to use to connect to the service.UnaryCallable callable object.public static <RequestT,ResponseT,PagedListResponseT> UnaryCallable<RequestT,PagedListResponseT> paged(UnaryCallable<RequestT,ResponseT> innerCallable, PagedCallSettings<RequestT,ResponseT,PagedListResponseT> pagedCallSettings)
innerCallable - the callable to issue callspagedCallSettings - PagedCallSettings to configure the paged settings with.UnaryCallable callable object.public static <RequestT,ResponseT,MetadataT> OperationCallable<RequestT,ResponseT,MetadataT> longRunningOperation(UnaryCallable<RequestT,OperationSnapshot> initialCallable, OperationCallSettings<RequestT,ResponseT,MetadataT> operationCallSettings, ClientContext clientContext, LongRunningClient longRunningClient)
initialCallable - the callable that initiates the operationoperationCallSettings - OperationCallSettings to configure the method-level
settings with.clientContext - ClientContext to use to connect to the service.longRunningClient - LongRunningClient to use to poll for updates on the Operation.OperationCallable callable object.