Package com.google.api.gax.rpc (2.52.0)

Repository

Client Classes

Client classes are the main entry point to using a package. They contain several variations of Java methods for each of the API's methods.

ClientDescription
com.google.api.gax.rpc.LongRunningClientImplementation-agnostic interface for managing long-running operations.

Settings Classes

Settings classes can be used to configure credentials, endpoints, and retry settings for a Client.

SettingsDescription
com.google.api.gax.rpc.BatchingCallSettingsA settings class to configure a UnaryCallable for calls to an API method that supports batching. The settings are provided using an instance of BatchingSettings.
com.google.api.gax.rpc.ClientSettingsA base settings class to configure a client class.

This base class includes settings that are applicable to all services, which includes things like settings for creating an executor, credentials, transport-specific settings, and identifiers

com.google.api.gax.rpc.OperationCallSettingsA settings class to configure an OperationCallable for calls to initiate, resume, and cancel a long-running operation.
com.google.api.gax.rpc.PagedCallSettingsA settings class to configure a UnaryCallable for calls to an API method that supports page .
com.google.api.gax.rpc.ServerCallSettingsA settings class to configure a ServerCallable.

This class includes settings that are applicable to all server calls, which currently just includes retries and watchdog timers.

com.google.api.gax.rpc.CallSettingsA settings class to configure a callable object for calls to a API method.
com.google.api.gax.rpc.StubSettingsA base settings class to configure a client stub class.

This base class includes settings that are applicable to all services, which includes things like settings for creating an executor, credentials, transport-specific settings, and identifiers

com.google.api.gax.rpc.UnaryCallSettingsA base settings class to configure a UnaryCallable. An instance of UnaryCallSettings is not sufficient on its own to construct a UnaryCallable; a concrete derived type is necessary.

This base class includes settings that are applicable to all calls, which currently is just

Classes

ClassDescription
com.google.api.gax.rpc.ApiCallContext.KeyKey for api call context options key-value pair.
com.google.api.gax.rpc.ApiClientHeaderProviderImplementation of HeaderProvider that provides headers describing the API client library making API calls.
com.google.api.gax.rpc.ApiClientHeaderProvider.Builder
com.google.api.gax.rpc.ApiExceptionFactoryA factory class that returns the corresponding type of exception class from the given status code.
com.google.api.gax.rpc.ApiExceptionsA utility class for working with ApiException.
com.google.api.gax.rpc.BatchA Batch contains a collection of requests that are to be batched into a single API call.

A Batch contains a single UnaryCallable object, which will be used to make the API call, and a list of BatchedRequestIssuer objects, which represent the individual requests

com.google.api.gax.rpc.BatchedFutureAn ApiFuture to be used with batching.

This is public only for technical reasons, for advanced usage.

com.google.api.gax.rpc.BatchedRequestIssuerBatchedRequestIssuer receives a response or an exception and waits to set the given batchedFuture until sendResult() is called.

This class is designed to be used by generated code.

com.google.api.gax.rpc.BatcherFactoryA Factory class which, for each unique partitionKey, creates a trio including a ThresholdBatcher, BatchExecutor, and ThresholdBatchingForwarder. The ThresholdBatchingForwarder pulls items from the ThresholdBatcher and forwards them to the BatchExecutor for processing.
com.google.api.gax.rpc.BatchingCallSettings.Builder
com.google.api.gax.rpc.BatchingCallableA UnaryCallable which will batch requests based on the given BatchingDescriptor and BatcherFactory. The BatcherFactory provides a distinct Batcher for each partition as specified by the BatchingDescriptor. An example of a batching partition would be a pubsub topic.
com.google.api.gax.rpc.BidiStreamA wrapper around a bidirectional stream.

This class asynchronously pulls responses from upstream via StreamController#request(int) and exposes them via its Iterator. The implementation is back pressure aware and uses a constant buffer of 1 item.

com.google.api.gax.rpc.BidiCallableA BidiCallable is an immutable object which is capable of making RPC calls to bidirectional API methods. Not all transports support .

It is considered advanced usage for a user to create a BidiCallable themselves. This

com.google.api.gax.rpc.CallablesClass with utility methods to create callable objects using provided settings.

The callable objects wrap a given direct callable with features like retry and exception translation.

com.google.api.gax.rpc.ClientContextEncapsulates client state, including executor, credentials, and transport channel.

Unlike ClientSettings which allows users to configure the client, ClientContext is intended to be used in generated code. Most users will not need to use it.

com.google.api.gax.rpc.ClientContext.Builder
com.google.api.gax.rpc.ClientSettings.Builder
com.google.api.gax.rpc.ClientCallableA ClientCallable is an immutable object which is capable of making RPC calls to client API methods. Not all transports support .

It is considered advanced usage for a user to create a ClientCallable themselves.

com.google.api.gax.rpc.EndpointContextEndpointContext is an internal class used by the client library to resolve the endpoint. It is created once the library is initialized should not be updated manually.

Contains the fields required to resolve the endpoint and Universe Domain

com.google.api.gax.rpc.EndpointContext.Builder
com.google.api.gax.rpc.ErrorDetailsThis class contains a list of standard error messages that returns from server.
com.google.api.gax.rpc.ErrorDetails.Builder
com.google.api.gax.rpc.FixedHeaderProviderAn instance of HeaderProvider that always provides the same headers.
com.google.api.gax.rpc.FixedTransportChannelProviderAn instance of TransportChannelProvider that always provides the same TransportChannel.
com.google.api.gax.rpc.FixedWatchdogProviderA watchdog provider which always returns the same watchdog instance provided to the provider during construction.

This is the internal class and is public only for technical reasons. It may change any time

com.google.api.gax.rpc.InstantiatingWatchdogProviderA watchdog provider which instantiates a new provider on every request.

This is the internal class and is public only for technical reasons. It may change any time without notice, please do not depend on it explicitly.

com.google.api.gax.rpc.NoHeaderProviderImplementation of HeaderProvider that provides empty headers.
com.google.api.gax.rpc.OperationCallSettings.Builder
com.google.api.gax.rpc.OperationCallableAn OperationCallable is an immutable object which is capable of initiating RPC calls to long-running API methods and returning an OperationFuture to manage the polling of the Operation and getting the response.
com.google.api.gax.rpc.PageContextThe context for a page call.
com.google.api.gax.rpc.PagedCallSettings.Builder
com.google.api.gax.rpc.PagedCallableA UnaryCallable which provides page functionality for unary calls.

Public for technical reasons - for advanced usage.

com.google.api.gax.rpc.RequestParamsBuilderThis builder class builds a request params map that will be used by autogenerated implementation of RequestParamsExtractor.
com.google.api.gax.rpc.RequestUrlParamsEncoderThe request params encoder, which encodes URL-encoded parameters in one URL parameters string.
com.google.api.gax.rpc.ServerStreamA blocking Iterable-style wrapper around server stream responses.

This class asynchronously pulls responses from upstream via StreamController#request(int) and exposes them via its Iterator. The implementation is back pressure aware and uses a constant buffer of 1 item.

com.google.api.gax.rpc.ServerCallSettings.Builder
com.google.api.gax.rpc.ServerCallableA ServerCallable is an immutable object which is capable of making RPC calls to server API methods. Not all transports support .

It is considered advanced usage for a user to create a ServerCallable themselves.

com.google.api.gax.rpc.StateCheckingResponseObserverBase implementation of ResponseObserver that performs state sanity checks.
com.google.api.gax.rpc.CallSettings.Builder
com.google.api.gax.rpc.StubSettings.Builder
com.google.api.gax.rpc.TranslatingUnaryCallableA UnaryCallable that translates request types and response types using the given transformers.
com.google.api.gax.rpc.UnaryCallSettings.BuilderA base builder class for UnaryCallSettings. This class should not be used to create an instance of the base class UnaryCallSettings. See the class documentation of UnaryCallSettings for a description of the different values that can be set, and for a description of when this builder may be used. Builders for concrete derived classes can be used to create instances of those classes.
com.google.api.gax.rpc.UnaryCallableA UnaryCallable is an immutable object which is capable of making RPC calls to non- API methods.

In typical usage, the request to send to the remote service will not be bound to the

com.google.api.gax.rpc.WatchdogPrevents the streams from hanging indefinitely. This middleware garbage collects idle streams in case the user forgot to close a ServerStream or if a connection is reset and GRPC does not get notified.

Interfaces

InterfaceDescription
com.google.api.gax.rpc.ApiCallContextContext for an API call.

An API call can be composed of many RPCs (in case of retries). This class contains settings for both: API calls and RPCs.

com.google.api.gax.rpc.ApiStreamObserverReceives notifications from an observable stream of messages.

It is used for sending messages in bidi (bidirectional) or client- calls, or for receiving messages in bidi or server- calls.

com.google.api.gax.rpc.BatchingDescriptorInterface which represents an object that transforms request/response data for the purposes of batching.

Implementations of BatchingDescriptor must guarantee that all methods are stateless and thread

com.google.api.gax.rpc.BidiStreamObserver
com.google.api.gax.rpc.ClientStreamA wrapper used to send requests to the server.

After sending requests, users must either call #closeSend() or #closeSendWithError(Throwable) on the stream. The error, if any, will be propagated to the server.

com.google.api.gax.rpc.ClientStreamReadyObserverA callback used to report that the ClientStream is ready to send more messages.
com.google.api.gax.rpc.HeaderProviderProvider of headers to put on http requests.
com.google.api.gax.rpc.PagedListDescriptorAn interface which provides the functionality to extract data from requests and inject data into requests for the purposes of page .

This class is designed to be used by generated code.

com.google.api.gax.rpc.PagedListResponseFactoryInterface for constructing futures which return PagedListResponse objects.

This class is designed to be used by generated code.

com.google.api.gax.rpc.RequestMutatorA request mutator takes a request message, applies some Function to it, and then returns the modified request message. This is currently only used for autopopulation of the request ID.
com.google.api.gax.rpc.RequestParamsEncoderA request params encoder takes a request object and encodes some (or all) of its parameters in a string form following specific parameter extraction and string encoding rules, defined by concrete implementations of this interface.
com.google.api.gax.rpc.RequestParamsExtractorA request params extractor takes a request message, extracts specific field values from it, converts them in strings and returns them as key-value pairs, where a key is a request field name and a value is a string representation of a field value. Nested fields should also be extractable, in such case the "dot notation" can be used to represent a nested field name, for
com.google.api.gax.rpc.ResponseObserverReceives notifications from server- calls.

The application is responsible for implementing the ResponseObserver and passing it to GAX, which then calls the observer with the messages for the application to receive them. The

com.google.api.gax.rpc.StatusCodeTransport-specific status code.

The status codes are modeled after the status codes in grpc. For more information about grpc status codes, see

com.google.api.gax.rpc.StreamControllerAllows the implementer of ResponseObserver to control the flow of responses.

An instance of this class will be passed to ResponseObserver#onStart(StreamController), at which point the receiver can disable automatic flow control. The receiver can also save a reference to the instance and terminate the stream

com.google.api.gax.rpc.TransportChannelClass whose instances can issue RPCs on a particular transport.
com.google.api.gax.rpc.TransportChannelProviderProvides an interface to either build a TransportChannel or provide a fixed TransportChannel that will be used to make calls to a service.

Implementations of TransportChannelProvider may choose to create a new TransportChannel for each call to #getTransportChannel, or may return a fixed TransportChannel instance.

com.google.api.gax.rpc.WatchdogProvider

Enums

EnumDescription
com.google.api.gax.rpc.StatusCode.Code

Exceptions

ExceptionDescription
com.google.api.gax.rpc.AbortedExceptionException thrown when the operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.
com.google.api.gax.rpc.AlreadyExistsExceptionException thrown when some entity that we attempted to create (e.g., file or directory) already exists.
com.google.api.gax.rpc.ApiExceptionRepresents an exception thrown during an RPC call.
com.google.api.gax.rpc.AsyncTaskExceptionThis exception is used to preserve the caller's stacktrace when invoking an async task in a sync context. It will be added as a suppressed exception when propagating the async exception. This allows callers to catch ApiException thrown in an async operation, while still maintaining the call site.
com.google.api.gax.rpc.CancelledExceptionThe exception thrown when the operation was cancelled (typically by the caller).
com.google.api.gax.rpc.DataLossExceptionException thrown due to unrecoverable data loss or corruption.
com.google.api.gax.rpc.DeadlineExceededExceptionException thrown when deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.
com.google.api.gax.rpc.FailedPreconditionExceptionException thrown when the operation was rejected because the system is not in a state required for the operation's execution. For example, directory to be deleted may be non-empty, an rmdir operation is applied to a non-directory, etc.
com.google.api.gax.rpc.InternalExceptionException thrown due to internal errors. Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken.
com.google.api.gax.rpc.InvalidArgumentExceptionException thrown when client specified an invalid argument. Note that this differs from FailedPreconditionException. This exception indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).
com.google.api.gax.rpc.NotFoundExceptionException thrown when some requested entity (e.g., file or directory) was not found.
com.google.api.gax.rpc.OutOfRangeExceptionException thrown when the operation was attempted past the valid range. E.g., seeking or reading past end of file.
com.google.api.gax.rpc.PermissionDeniedExceptionException thrown when the caller does not have permission to execute the specified operation.
com.google.api.gax.rpc.ProtocolBufferParsingExceptionException thrown when parsing protocol buffer message failed
com.google.api.gax.rpc.ResourceExhaustedExceptionException thrown when some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
com.google.api.gax.rpc.UnauthenticatedExceptionException thrown when the request does not have valid authentication credentials for the operation.
com.google.api.gax.rpc.UnavailableExceptionException thrown when the service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
com.google.api.gax.rpc.UnimplementedExceptionException thrown when the operation is not implemented or not supported/enabled in this service.
com.google.api.gax.rpc.UnknownExceptionException thrown due to an unknown error. An example of where this error may be returned is if a Status value received from another address space belongs to an error-space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.
com.google.api.gax.rpc.WatchdogTimeoutExceptionThe marker exception thrown when a timeout is exceeded.

This error can be thrown under 2 circumstances: