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 webpage provides documentation for \u003ccode\u003eClientContext\u003c/code\u003e, an abstract class in the Google API client library for Java.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e encapsulates client state information, including the executor, credentials, and transport channel, primarily for internal use in generated code.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation lists various versions of the \u003ccode\u003eClientContext\u003c/code\u003e class, with the latest version being 2.63.1 and the oldest documented version being 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods to retrieve crucial components of the client state like credentials, endpoint, executor, and background resources, and it also contains static methods for creating new instances from settings.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e is designed to be used in conjunction with \u003ccode\u003eClientSettings\u003c/code\u003e and \u003ccode\u003eStubSettings\u003c/code\u003e to configure and manage client resources, along with an option to create new \u003ccode\u003eClientContext.Builder\u003c/code\u003e instances.\u003c/p\u003e\n"]]],[],null,[]]