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.
The objects that need to be closed in order to clean up the resources created in the process of
creating this ClientContext. This will include the closeables from the transport context.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The latest version of `ClientContext` is 2.63.1, which is part of the Google API Client Libraries for Java."],["`ClientContext` encapsulates the client state, including the executor, credentials, and transport channel, and is primarily intended for use within generated code rather than by most users."],["`ClientContext` offers static methods to create new instances based on `ClientSettings` or `StubSettings`, including methods `create()` and `newBuilder()`, and has methods to retrieve the resources it contains."],["It contains methods to get critical aspects of the client's configuration, like `getCredentials()`, `getExecutor()`, and `getTransportChannel()`, along with methods to manage tracing and background resources."],["The `ClientContext` class has many methods that are used to get information about the context like `getEndpoint()` or `getHeaders()`."]]],[]]