Class InstantiatingHttpJsonChannelProvider (2.7.1)
Stay organized with collections
Save and categorize content based on your preferences.
- 2.72.1 (latest)
- 2.71.0
- 2.70.3
- 2.69.0
- 2.68.2
- 2.67.0
- 2.66.0
- 2.65.0
- 2.63.1
- 2.62.0
- 2.61.0
- 2.60.0
- 2.59.1
- 2.58.0
- 2.57.0
- 2.55.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.1
- 2.47.0
- 2.46.1
- 2.45.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.1
- 2.33.0
- 2.32.1
- 2.31.1
- 2.30.1
- 2.24.0
- 2.23.3
- 2.22.0
- 2.21.0
- 2.20.1
- 2.19.6
- 2.18.7
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.2
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.1
- 2.7.1
publicfinalclass InstantiatingHttpJsonChannelProviderimplementsTransportChannelProviderInstantiatingHttpJsonChannelProvider is a TransportChannelProvider which constructs a ManagedHttpJsonChannel with a number of configured inputs every time getChannel(...) is called. These inputs include a port, a service address, and credentials.
The credentials can either be supplied directly (by providing a FixedCredentialsProvider to Builder.setCredentialsProvider()) or acquired implicitly from Application Default Credentials (by providing a GoogleCredentialsProvider to Builder.setCredentialsProvider()).
The client lib header and generator header values are used to form a value that goes into the http header of requests to the service.
Implements
TransportChannelProviderInherited Members
Methods
acceptsPoolSize()
publicbooleanacceptsPoolSize()Reports whether this provider allows pool size customization.
getEndpoint()
publicStringgetEndpoint()The endpoint to be used for the channel.
getTransportChannel()
publicTransportChannelgetTransportChannel()Provides a Transport, which could either be a new instance for every call, or the same instance, depending on the implementation.
If #needsExecutor() is true, then #withExecutor(Executor) needs to be called first to provide an executor.
If #needsHeaders() is true, then #withHeaders(Map) needs to be called first to provide headers.
if #needsEndpoint() is true, then #withEndpoint(String) needs to be called first to provide an endpoint.
getTransportName()
publicStringgetTransportName()The name of the transport.
This string can be used for identifying transports for switching logic.
needsCredentials()
publicbooleanneedsCredentials()True if credentials are needed before channel creation.
needsEndpoint()
publicbooleanneedsEndpoint()True if the TransportProvider has no endpoint set.
needsExecutor() (deprecated)
publicbooleanneedsExecutor()(deprecated) If executor is not set, this channel provider will create channels with default executor defined in ManagedHttpJsonChannel.
True if the TransportProvider needs an executor.needsHeaders()
publicbooleanneedsHeaders()True if the TransportProvider has no headers provided.
newBuilder()
publicstaticInstantiatingHttpJsonChannelProvider.BuildernewBuilder()shouldAutoClose()
publicbooleanshouldAutoClose()Indicates whether the TransportChannel should be closed by the containing client class.
toBuilder()
publicInstantiatingHttpJsonChannelProvider.BuildertoBuilder()withCredentials(Credentials credentials)
publicTransportChannelProviderwithCredentials(Credentialscredentials)Sets the credentials that will be applied before channel creation.
com.google.auth.CredentialswithEndpoint(String endpoint)
publicTransportChannelProviderwithEndpoint(Stringendpoint)Sets the endpoint to use when constructing a new TransportChannel.
This method should only be called if #needsEndpoint() returns true.
withExecutor(Executor executor)
publicTransportChannelProviderwithExecutor(Executorexecutor)Sets the executor to use when constructing a new TransportChannel.
withExecutor(ScheduledExecutorService executor)
publicTransportChannelProviderwithExecutor(ScheduledExecutorServiceexecutor)withHeaders(Map<String,String> headers)
publicTransportChannelProviderwithHeaders(Map<String,String>headers)Sets the headers to use when constructing a new TransportChannel.
This method should only be called if #needsHeaders() returns true.
withPoolSize(int size)
publicTransportChannelProviderwithPoolSize(intsize)Number of underlying transport channels to open. Calls will be load balanced across them.