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-09-03 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eClientContext\u003c/code\u003e is 2.63.1, with various other versions available, all the way back to 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e is a component that encapsulates client state, including executor, credentials, and transport channel, primarily intended for use in generated code rather than direct user interaction.\u003c/p\u003e\n"],["\u003cp\u003eIt has methods to get the resources needed to close and clean up the process when creating it, as well as methods to retrieve credentials, executor, endpoint, headers, and more.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eClientContext\u003c/code\u003e class has static methods, such as \u003ccode\u003ecreate\u003c/code\u003e to instantiate the class based on the client settings and \u003ccode\u003enewBuilder\u003c/code\u003e to create a default instance, along with instance methods to retrieve its properties.\u003c/p\u003e\n"],["\u003cp\u003eThe ClientContext can be created with ClientSettings or StubSettings, and it also contains properties to return a watch dog, tracer factory, call contexts, clock and various other necessary parameters.\u003c/p\u003e\n"]]],[],null,[]]