public abstract class ClientContext
extends java.lang.Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
ClientContext.Builder |
Constructor and Description |
---|
ClientContext() |
Modifier and Type | Method and Description |
---|---|
static ClientContext |
create(ClientSettings settings)
Instantiates the executor, credentials, and transport context based on the given client
settings.
|
static ClientContext |
create(StubSettings settings)
Instantiates the executor, credentials, and transport context based on the given client
settings.
|
abstract java.util.List<BackgroundResource> |
getBackgroundResources()
The objects that need to be closed in order to clean up the resources created in the process of
creating this ClientContext.
|
abstract com.google.api.core.ApiClock |
getClock() |
abstract com.google.auth.Credentials |
getCredentials() |
abstract ApiCallContext |
getDefaultCallContext() |
abstract java.lang.String |
getEndpoint() |
abstract java.util.concurrent.ScheduledExecutorService |
getExecutor() |
abstract java.util.Map<java.lang.String,java.lang.String> |
getHeaders() |
protected abstract java.util.Map<java.lang.String,java.lang.String> |
getInternalHeaders() |
abstract java.lang.String |
getQuotaProjectId() |
abstract Watchdog |
getStreamWatchdog() |
abstract org.threeten.bp.Duration |
getStreamWatchdogCheckInterval() |
abstract ApiTracerFactory |
getTracerFactory()
Gets the
ApiTracerFactory that will be used to generate traces for operations. |
abstract TransportChannel |
getTransportChannel() |
static ClientContext.Builder |
newBuilder() |
abstract ClientContext.Builder |
toBuilder() |
public abstract java.util.List<BackgroundResource> getBackgroundResources()
public abstract java.util.concurrent.ScheduledExecutorService getExecutor()
@Nullable public abstract com.google.auth.Credentials getCredentials()
@Nullable public abstract TransportChannel getTransportChannel()
@BetaApi(value="The surface for customizing headers is not stable yet and may change in the future.") public abstract java.util.Map<java.lang.String,java.lang.String> getHeaders()
@BetaApi(value="The surface for customizing headers is not stable yet and may change in the future.") protected abstract java.util.Map<java.lang.String,java.lang.String> getInternalHeaders()
public abstract com.google.api.core.ApiClock getClock()
public abstract ApiCallContext getDefaultCallContext()
@BetaApi(value="The surface for streaming is not stable yet and may change in the future.") @Nullable public abstract Watchdog getStreamWatchdog()
@BetaApi(value="The surface for streaming is not stable yet and may change in the future.") @Nonnull public abstract org.threeten.bp.Duration getStreamWatchdogCheckInterval()
@Nullable public abstract java.lang.String getEndpoint()
@Nullable public abstract java.lang.String getQuotaProjectId()
@BetaApi(value="The surface for tracing is not stable yet and may change in the future.") @Nonnull public abstract ApiTracerFactory getTracerFactory()
ApiTracerFactory
that will be used to generate traces for operations.public static ClientContext.Builder newBuilder()
public abstract ClientContext.Builder toBuilder()
public static ClientContext create(ClientSettings settings) throws java.io.IOException
java.io.IOException
public static ClientContext create(StubSettings settings) throws java.io.IOException
java.io.IOException