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\u003eThe latest version available for \u003ccode\u003eClientContext\u003c/code\u003e is 2.63.1, with a history of versions dating back to 2.7.1.\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, which is primarily intended for use in generated code.\u003c/p\u003e\n"],["\u003cp\u003eUsers can create a \u003ccode\u003eClientContext\u003c/code\u003e by instantiating it from \u003ccode\u003eClientSettings\u003c/code\u003e or \u003ccode\u003eStubSettings\u003c/code\u003e, configuring it based on the given client settings.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eClientContext\u003c/code\u003e class offers methods to access various components, such as background resources, clock, credentials, call context, endpoint, executor, headers, watchdog, and transport channel, among others.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e also provides static methods for creating a new instance, or creating a new \u003ccode\u003eBuilder\u003c/code\u003e object to build a new instance.\u003c/p\u003e\n"]]],[],null,[]]