Class EndpointContext (2.72.2)

publicabstractclassEndpointContext

EndpointContext is an internal class used by the client library to resolve the endpoint. It is created once the library is initialized should not be updated manually.

Contains the fields required to resolve the endpoint and Universe Domain

Static Fields

GOOGLE_CLOUD_UNIVERSE_DOMAIN

publicstaticfinalStringGOOGLE_CLOUD_UNIVERSE_DOMAIN
Field Value
TypeDescription
String

INVALID_UNIVERSE_DOMAIN_ERROR_TEMPLATE

publicstaticfinalStringINVALID_UNIVERSE_DOMAIN_ERROR_TEMPLATE
Field Value
TypeDescription
String

UNABLE_TO_RETRIEVE_CREDENTIALS_ERROR_MESSAGE

publicstaticfinalStringUNABLE_TO_RETRIEVE_CREDENTIALS_ERROR_MESSAGE
Field Value
TypeDescription
String

Static Methods

getDefaultInstance()

publicstaticEndpointContextgetDefaultInstance()
Returns
TypeDescription
EndpointContext

newBuilder()

publicstaticEndpointContext.BuildernewBuilder()
Returns
TypeDescription
EndpointContext.Builder

Constructors

EndpointContext()

publicEndpointContext()

Methods

clientSettingsEndpoint()

publicabstractStringclientSettingsEndpoint()

ClientSettingsEndpoint is the endpoint value set via the ClientSettings/StubSettings classes.

Returns
TypeDescription
String

mtlsEndpoint()

publicabstractStringmtlsEndpoint()
Returns
TypeDescription
String

mtlsProvider()

publicabstractMtlsProvidermtlsProvider()
Returns
TypeDescription
com.google.auth.mtls.MtlsProvider

resolvedEndpoint()

publicabstractStringresolvedEndpoint()
Returns
TypeDescription
String

serviceName()

publicabstractStringserviceName()

ServiceName is host URI for Google Cloud Services. It follows the format of{ServiceName}.googleapis.com. For example, speech.googleapis.com would have a ServiceName of speech and cloudasset.googleapis.com would have a ServiceName of cloudasset.

Returns
TypeDescription
String

switchToMtlsEndpointAllowed()

publicabstractbooleanswitchToMtlsEndpointAllowed()
Returns
TypeDescription
boolean

toBuilder()

publicabstractEndpointContext.BuildertoBuilder()
Returns
TypeDescription
EndpointContext.Builder

transportChannelProviderEndpoint()

publicabstractStringtransportChannelProviderEndpoint()

TransportChannelProviderEndpoint is the endpoint value set via the TransportChannelProvider class.

Returns
TypeDescription
String

universeDomain()

publicabstractStringuniverseDomain()

Universe Domain is the domain for Google Cloud Services. It follows the format of{ServiceName}.{UniverseDomain}. For example, speech.googleapis.com would have a Universe Domain value ofgoogleapis.com and cloudasset.test.com would have a Universe Domain oftest.com. If this value is not set, this will default togoogleapis.com.

Returns
TypeDescription
String

usingGDCH()

publicabstractbooleanusingGDCH()
Returns
TypeDescription
boolean

validateUniverseDomain(Credentials credentials, StatusCode invalidUniverseDomainStatusCode)

publicvoidvalidateUniverseDomain(Credentialscredentials,StatusCodeinvalidUniverseDomainStatusCode)

Check that the User configured universe domain matches the Credentials' universe domain. The status code parameter is passed in to this method as it's a limitation of Gax's modules. The transport-neutral module does have access the transport-specific modules (which contain the implementation of the StatusCode). This method is scoped to be internal and should be not be accessed by users.

Parameters
NameDescription
credentialscom.google.auth.Credentials

Auth Library Credentials

invalidUniverseDomainStatusCodeStatusCode

Transport-specific Status Code to be returned if the Universe Domain is invalid. For both transports, this is defined to be Unauthorized.

Exceptions
TypeDescription
IOException

Implementation of Auth's Retryable interface which tells the client library whether the RPC should be retried or not.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.