Encapsulates client state, including executor, credentials, and transport channel.
UnlikeClientSettingswhich allows users to configure the client,ClientContextis 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-09-04 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eClientContext\u003c/code\u003e class, with the latest version being 2.63.1 and a current view of version 2.9.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e encapsulates client state, including the executor, credentials, and transport channel, for internal use in generated code rather than user configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eClientContext\u003c/code\u003e class provides methods for retrieving client resources such as the executor, credentials, endpoint, headers, and the transport channel.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecreate\u003c/code\u003e method allows instantiation of a \u003ccode\u003eClientContext\u003c/code\u003e based on \u003ccode\u003eClientSettings\u003c/code\u003e or \u003ccode\u003eStubSettings\u003c/code\u003e, potentially throwing an \u003ccode\u003eIOException\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere is a long list of versions available, from 2.63.1 down to 2.7.1 for the user to view the documentation for the \u003ccode\u003eClientContext\u003c/code\u003e class.\u003c/p\u003e\n"]]],[],null,[]]