Package (2.23.0)

Stay organized with collections Save and categorize content based on your preferences.



Settings to control ChannelPool behavior.

To facilitate low latency/high throughout applications, gax provides a ChannelPool. The pool is meant to facilitate high throughput/low latency clients. By splitting load across multiple gRPC channels the client can spread load across multiple frontends and overcome gRPC's limit of 100 concurrent RPCs per channel. However oversizing the ChannelPool can lead to underutilized channels which will lead to high tail latency due to GFEs disconnecting idle channels.

The ChannelPool is designed to adapt to varying traffic patterns by tracking outstanding RPCs and resizing the pool size. This class configures the behavior. In general clients should aim to have less than 50 concurrent RPCs per channel and at least 1 outstanding per channel per minute.

The settings in this class will be applied every minute.



Provides properties of the GAX-GRPC library.


GrpcCallContext encapsulates context data used to make a grpc call.

GrpcCallContext is immutable in the sense that none of its methods modifies the GrpcCallContext itself or the underlying data. Methods of the form withX, such as #withTransportChannel, return copies of the object, but with one field changed. The immutability and thread safety of the arguments solely depends on the arguments themselves.


Grpc-specific settings for creating callables.



Class with utility methods to create grpc-based direct callables.


An interceptor to handle custom headers.

Package-private for internal usage.


Class with utility methods to create low level grpc-based direct callables.


GrpcResponseMetadata provides a mechanism to access the headers and trailers returned by a gRPC client method.

NOTE: the GrpcResponseMetadata class is not thread-safe and should NOT be re-used for multiple calls. A new instance of GrpcResponseMetadata should be constructed for each call that requires metadata to be accessed.

Example usage:

 GrpcResponseMetadata grpcResponseMetadata = new GrpcResponseMetadata();
 Foo foo = client.getFooCallable().call(getFooRequest, grpcResponseMetadata.createContextWithHandlers());
 Metadata headers = grpcResponseMetadata.getMetadata();
 Metadata trailers = grpcResponseMetadata.getTrailingMetadata();


A failure code specific to a gRPC call.


Implementation of TransportChannel based on gRPC.



InstantiatingGrpcChannelProvider is a TransportChannelProvider which constructs a gRPC ManagedChannel with a number of configured inputs every time getChannel(...) is called. These inputs include a port, a service address, and credentials.

The credentials can either be supplied directly (by providing a FixedCredentialsProvider to Builder.setCredentialsProvider()) or acquired implicitly from Application Default Credentials (by providing a GoogleCredentialsProvider to Builder.setCredentialsProvider()).

The client lib header and generator header values are used to form a value that goes into the http header of requests to the service.



Public for technical reasons; intended for use by generated code.





This interface represents a factory for creating one ManagedChannel

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


An interface to prepare a ManagedChannel for normal requests by priming the channel

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


Provider of custom gRPC ClientInterceptors.



An interface to handle metadata returned from an RPC. A ResponseMetadataHandler is used by the GrpcMetadataHandlerInterceptor class to provide custom handling of the returned headers and trailers.