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 page provides documentation for \u003ccode\u003eClientContext\u003c/code\u003e, an abstract class in the Google API client library for Java that manages client state, including executor, credentials, and the transport channel.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e is intended for internal use within generated code and is not typically required for direct interaction by most users, unlike \u003ccode\u003eClientSettings\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eClientContext\u003c/code\u003e documented here is 2.63.1, with an extensive list of past versions also available for reference.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientContext\u003c/code\u003e offers methods for retrieving components like \u003ccode\u003egetExecutor\u003c/code\u003e, \u003ccode\u003egetCredentials\u003c/code\u003e, \u003ccode\u003egetTransportChannel\u003c/code\u003e, and others, and static methods such as \u003ccode\u003ecreate\u003c/code\u003e and \u003ccode\u003enewBuilder\u003c/code\u003e to instantiate and build it respectively.\u003c/p\u003e\n"],["\u003cp\u003eThis class encapsulates several details like background resources, the clock used, default API call context, endpoint, headers, and more.\u003c/p\u003e\n"]]],[],null,[]]