Class InstantiatingHttpJsonChannelProvider.Builder (2.51.0)

public static final class InstantiatingHttpJsonChannelProvider.Builder

Inheritance

java.lang.Object > InstantiatingHttpJsonChannelProvider.Builder

Methods

build()

public InstantiatingHttpJsonChannelProvider build()
Returns
Type Description
InstantiatingHttpJsonChannelProvider

getEndpoint()

public String getEndpoint()
Returns
Type Description
String

setEndpoint(String endpoint)

public InstantiatingHttpJsonChannelProvider.Builder setEndpoint(String endpoint)

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

Parameter
Name Description
endpoint String
Returns
Type Description
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
Name Description
executor Executor
Returns
Type Description
InstantiatingHttpJsonChannelProvider.Builder

setExecutorProvider(ExecutorProvider executorProvider) (deprecated)

public InstantiatingHttpJsonChannelProvider.Builder setExecutorProvider(ExecutorProvider executorProvider)

Deprecated. Please use #setExecutor(Executor).

Parameter
Name Description
executorProvider ExecutorProvider
Returns
Type Description
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
Name Description
headerProvider HeaderProvider
Returns
Type Description
InstantiatingHttpJsonChannelProvider.Builder

setHttpTransport(HttpTransport httpTransport)

public InstantiatingHttpJsonChannelProvider.Builder setHttpTransport(HttpTransport httpTransport)

Sets the HTTP transport to be used.

Parameter
Name Description
httpTransport com.google.api.client.http.HttpTransport
Returns
Type Description
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
Name Description
interceptorProvider HttpJsonInterceptorProvider
Returns
Type Description
InstantiatingHttpJsonChannelProvider.Builder