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-08-28 UTC."],[[["\u003cp\u003eThe webpage provides documentation for various versions of \u003ccode\u003eClientContext\u003c/code\u003e, ranging from version 2.7.1 to the latest version 2.63.1, with version 2.39.0 being highlighted.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e is an abstract class that encapsulates client state, including executor, credentials, and transport channel, and is primarily intended for use in generated code, rather than direct user interaction.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e offers methods for managing resources, such as \u003ccode\u003egetBackgroundResources()\u003c/code\u003e, and for retrieving configurations like credentials, the endpoint, and the executor using methods like \u003ccode\u003egetCredentials()\u003c/code\u003e, \u003ccode\u003egetEndpoint()\u003c/code\u003e, and \u003ccode\u003egetExecutor()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes static methods \u003ccode\u003ecreate()\u003c/code\u003e to instantiate \u003ccode\u003eClientContext\u003c/code\u003e based on \u003ccode\u003eClientSettings\u003c/code\u003e or \u003ccode\u003eStubSettings\u003c/code\u003e and \u003ccode\u003enewBuilder()\u003c/code\u003e to create a \u003ccode\u003eClientContext.Builder\u003c/code\u003e, which can throw an \u003ccode\u003eIOException\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes the feature of using \u003ccode\u003eApiTracerFactory\u003c/code\u003e, which at the moment is still in Beta and not stable.\u003c/p\u003e\n"]]],[],null,[]]