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

GitHub 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.

Client Description
com.google.api.gax.rpc.LongRunningClient Implementation-agnostic interface for managing long-running operations.

Settings Classes

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

Settings Description
com.google.api.gax.rpc.BatchingCallSettings A 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.ClientSettings A 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.OperationCallSettings A settings class to configure an OperationCallable for calls to initiate, resume, and cancel a long-running operation.
com.google.api.gax.rpc.PagedCallSettings A settings class to configure a UnaryCallable for calls to an API method that supports page streaming.
com.google.api.gax.rpc.ServerStreamingCallSettings A settings class to configure a ServerStreamingCallable.

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

com.google.api.gax.rpc.StreamingCallSettings A settings class to configure a streaming callable object for calls to a streaming API method.
com.google.api.gax.rpc.StubSettings A 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.UnaryCallSettings A 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

Class Description
com.google.api.gax.rpc.ApiCallContext.Key Key for api call context options key-value pair.
com.google.api.gax.rpc.ApiClientHeaderProvider Implementation 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.ApiExceptionFactory A factory class that returns the corresponding type of exception class from the given status code.
com.google.api.gax.rpc.ApiExceptions A utility class for working with ApiException.
com.google.api.gax.rpc.Batch A 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.BatchedFuture An ApiFuture to be used with batching.

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

com.google.api.gax.rpc.BatchedRequestIssuer BatchedRequestIssuer 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.BatcherFactory A 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.BatchingCallable A 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.BidiStream A 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.BidiStreamingCallable A BidiStreamingCallable is an immutable object which is capable of making RPC calls to bidirectional streaming API methods. Not all transports support streaming.

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

com.google.api.gax.rpc.Callables Class 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.ClientContext Encapsulates 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.ClientStreamingCallable A ClientStreamingCallable is an immutable object which is capable of making RPC calls to client streaming API methods. Not all transports support streaming.

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

com.google.api.gax.rpc.EndpointContext EndpointContext 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.ErrorDetails This class contains a list of standard error messages that returns from server.
com.google.api.gax.rpc.ErrorDetails.Builder
com.google.api.gax.rpc.FixedHeaderProvider An instance of HeaderProvider that always provides the same headers.
com.google.api.gax.rpc.FixedTransportChannelProvider An instance of TransportChannelProvider that always provides the same TransportChannel.
com.google.api.gax.rpc.FixedWatchdogProvider A 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.InstantiatingWatchdogProvider A 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.NoHeaderProvider Implementation of HeaderProvider that provides empty headers.
com.google.api.gax.rpc.OperationCallSettings.Builder
com.google.api.gax.rpc.OperationCallable An 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.PageContext The context for a page call.
com.google.api.gax.rpc.PagedCallSettings.Builder
com.google.api.gax.rpc.PagedCallable A UnaryCallable which provides page streaming functionality for unary calls.

Public for technical reasons - for advanced usage.

com.google.api.gax.rpc.RequestParamsBuilder This builder class builds a request params map that will be used by autogenerated implementation of RequestParamsExtractor.
com.google.api.gax.rpc.RequestUrlParamsEncoder The request params encoder, which encodes URL-encoded parameters in one URL parameters string.
com.google.api.gax.rpc.ServerStream A 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.ServerStreamingCallSettings.Builder
com.google.api.gax.rpc.ServerStreamingCallable A ServerStreamingCallable is an immutable object which is capable of making RPC calls to server streaming API methods. Not all transports support streaming.

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

com.google.api.gax.rpc.StateCheckingResponseObserver Base implementation of ResponseObserver that performs state sanity checks.
com.google.api.gax.rpc.StreamingCallSettings.Builder
com.google.api.gax.rpc.StubSettings.Builder
com.google.api.gax.rpc.TranslatingUnaryCallable A UnaryCallable that translates request types and response types using the given transformers.
com.google.api.gax.rpc.UnaryCallSettings.Builder A 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.UnaryCallable A UnaryCallable is an immutable object which is capable of making RPC calls to non-streaming API methods.

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

com.google.api.gax.rpc.Watchdog Prevents 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

Interface Description
com.google.api.gax.rpc.ApiCallContext Context 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.ApiStreamObserver Receives notifications from an observable stream of messages.

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

com.google.api.gax.rpc.BatchingDescriptor Interface 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.ClientStream A 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.ClientStreamReadyObserver A callback used to report that the ClientStream is ready to send more messages.
com.google.api.gax.rpc.HeaderProvider Provider of headers to put on http requests.
com.google.api.gax.rpc.PagedListDescriptor An interface which provides the functionality to extract data from requests and inject data into requests for the purposes of page streaming.

This class is designed to be used by generated code.

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

This class is designed to be used by generated code.

com.google.api.gax.rpc.RequestMutator A 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.RequestParamsEncoder A 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.RequestParamsExtractor A 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.ResponseObserver Receives notifications from server-streaming 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.StatusCode Transport-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.StreamController Allows 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.TransportChannel Class whose instances can issue RPCs on a particular transport.
com.google.api.gax.rpc.TransportChannelProvider Provides 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

Enum Description
com.google.api.gax.rpc.StatusCode.Code

Exceptions

Exception Description
com.google.api.gax.rpc.AbortedException Exception thrown when the operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.
com.google.api.gax.rpc.AlreadyExistsException Exception thrown when some entity that we attempted to create (e.g., file or directory) already exists.
com.google.api.gax.rpc.ApiException Represents an exception thrown during an RPC call.
com.google.api.gax.rpc.AsyncTaskException This 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.CancelledException The exception thrown when the operation was cancelled (typically by the caller).
com.google.api.gax.rpc.DataLossException Exception thrown due to unrecoverable data loss or corruption.
com.google.api.gax.rpc.DeadlineExceededException Exception 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.FailedPreconditionException Exception 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.InternalException Exception 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.InvalidArgumentException Exception 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.NotFoundException Exception thrown when some requested entity (e.g., file or directory) was not found.
com.google.api.gax.rpc.OutOfRangeException Exception thrown when the operation was attempted past the valid range. E.g., seeking or reading past end of file.
com.google.api.gax.rpc.PermissionDeniedException Exception thrown when the caller does not have permission to execute the specified operation.
com.google.api.gax.rpc.ProtocolBufferParsingException Exception thrown when parsing protocol buffer message failed
com.google.api.gax.rpc.ResourceExhaustedException Exception 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.UnauthenticatedException Exception thrown when the request does not have valid authentication credentials for the operation.
com.google.api.gax.rpc.UnavailableException Exception 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.UnimplementedException Exception thrown when the operation is not implemented or not supported/enabled in this service.
com.google.api.gax.rpc.UnknownException Exception 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.WatchdogTimeoutException The marker exception thrown when a timeout is exceeded.

This error can be thrown under 2 circumstances: