Class InstantiatingHttpJsonChannelProvider.Builder (2.39.0)

public static final class InstantiatingHttpJsonChannelProvider.Builder

Inheritance

java.lang.Object > InstantiatingHttpJsonChannelProvider.Builder

Methods

build()

public InstantiatingHttpJsonChannelProvider build()
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider

getEndpoint()

public String getEndpoint()
Returns
TypeDescription
String

setEndpoint(String endpoint)

public InstantiatingHttpJsonChannelProvider.Builder setEndpoint(String endpoint)

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

Parameter
NameDescription
endpointString
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider.Builder

setExecutor(Executor executor)

public InstantiatingHttpJsonChannelProvider.Builder setExecutor(Executor executor)

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
NameDescription
executorExecutor
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider.Builder

setExecutorProvider(ExecutorProvider executorProvider) (deprecated)

public InstantiatingHttpJsonChannelProvider.Builder setExecutorProvider(ExecutorProvider executorProvider)

Deprecated. Please use #setExecutor(Executor).

Parameter
NameDescription
executorProviderExecutorProvider
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider.Builder

setHeaderProvider(HeaderProvider headerProvider)

public InstantiatingHttpJsonChannelProvider.Builder setHeaderProvider(HeaderProvider headerProvider)

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
NameDescription
headerProviderHeaderProvider
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider.Builder

setHttpTransport(HttpTransport httpTransport)

public InstantiatingHttpJsonChannelProvider.Builder setHttpTransport(HttpTransport httpTransport)

Sets the HTTP transport to be used.

Parameter
NameDescription
httpTransportcom.google.api.client.http.HttpTransport
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider.Builder

setInterceptorProvider(HttpJsonInterceptorProvider interceptorProvider)

public InstantiatingHttpJsonChannelProvider.Builder setInterceptorProvider(HttpJsonInterceptorProvider interceptorProvider)

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
NameDescription
interceptorProviderHttpJsonInterceptorProvider
Returns
TypeDescription
InstantiatingHttpJsonChannelProvider.Builder