@BetaApi 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.
|
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() |
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()
public abstract com.google.api.core.ApiClock getClock()
public abstract ApiCallContext getDefaultCallContext()
public static ClientContext.Builder newBuilder()
public ClientContext.Builder toBuilder()
public static ClientContext create(ClientSettings settings) throws IOException
IOException