public abstract class ClientContext extends 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 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 String |
getEndpoint() |
abstract ScheduledExecutorService |
getExecutor() |
abstract Map<String,String> |
getHeaders() |
protected abstract Map<String,String> |
getInternalHeaders() |
abstract Watchdog |
getStreamWatchdog() |
abstract org.threeten.bp.Duration |
getStreamWatchdogCheckInterval() |
abstract TransportChannel |
getTransportChannel() |
static ClientContext.Builder |
newBuilder() |
ClientContext.Builder |
toBuilder() |
public abstract List<BackgroundResource> getBackgroundResources()
public abstract 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 Map<String,String> getHeaders()
@BetaApi(value="The surface for customizing headers is not stable yet and may change in the future.") protected abstract Map<String,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()
public static ClientContext.Builder newBuilder()
public ClientContext.Builder toBuilder()
public static ClientContext create(ClientSettings settings) throws IOException
IOExceptionpublic static ClientContext create(StubSettings settings) throws IOException
IOException