Class InstantiatingHttpJsonChannelProvider.Builder (2.13.0)

publicstaticfinalclass InstantiatingHttpJsonChannelProvider.Builder

Inheritance

java.lang.Object > InstantiatingHttpJsonChannelProvider.Builder

Methods

build()

publicInstantiatingHttpJsonChannelProviderbuild()
Returns
Type Description

getEndpoint()

publicStringgetEndpoint()
Returns
Type Description

setEndpoint(String endpoint)

publicInstantiatingHttpJsonChannelProvider.BuildersetEndpoint(Stringendpoint)

Sets the endpoint used to reach the service, eg "localhost:8080".

Parameter
Name Description
endpoint String
Returns
Type Description

setExecutor(Executor executor)

publicInstantiatingHttpJsonChannelProvider.BuildersetExecutor(Executorexecutor)

Sets the Executor for this TransportChannelProvider.

This is optional; if it is not provided, needsExecutor() will return true, meaning that an Executor must be provided when getChannel is called on the constructed TransportChannelProvider instance. Note: InstantiatingHttpJsonChannelProvider will automatically provide its own Executor in this circumstance when it calls getChannel.

Parameter
Name Description
executor Executor
Returns
Type Description

setExecutorProvider(ExecutorProvider executorProvider) (deprecated)

publicInstantiatingHttpJsonChannelProvider.BuildersetExecutorProvider(ExecutorProviderexecutorProvider)

Deprecated. Please use #setExecutor(Executor).

Parameter
Name Description
executorProvider ExecutorProvider
Returns
Type Description

setHeaderProvider(HeaderProvider headerProvider)

publicInstantiatingHttpJsonChannelProvider.BuildersetHeaderProvider(HeaderProviderheaderProvider)

Sets the HeaderProvider for this TransportChannelProvider.

This is optional; if it is not provided, needsHeaders() will return true, meaning that headers must be provided when getChannel is called on the constructed TransportChannelProvider instance.

Parameter
Name Description
headerProvider HeaderProvider
Returns
Type Description

setHttpTransport(HttpTransport httpTransport)

publicInstantiatingHttpJsonChannelProvider.BuildersetHttpTransport(HttpTransporthttpTransport)

Sets the HTTP transport to be used.

Parameter
Name Description
httpTransport com.google.api.client.http.HttpTransport
Returns
Type Description

setInterceptorProvider(HttpJsonInterceptorProvider interceptorProvider)

publicInstantiatingHttpJsonChannelProvider.BuildersetInterceptorProvider(HttpJsonInterceptorProviderinterceptorProvider)

Sets the GrpcInterceptorProvider for this TransportChannelProvider.

The provider will be called once for each underlying gRPC ManagedChannel that is created. It is recommended to return a new list of new interceptors on each call so that interceptors are not shared among channels, but this is not required.

Parameter
Name Description
interceptorProvider HttpJsonInterceptorProvider
Returns
Type Description

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

Last updated 2025年11月19日 UTC.