Package com.google.api.gax.httpjson
Class InstantiatingHttpJsonChannelProvider
- java.lang.Object
-
- com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider
-
- All Implemented Interfaces:
com.google.api.gax.rpc.TransportChannelProvider
@BetaApi @InternalExtensionOnly public final class InstantiatingHttpJsonChannelProvider extends Object implements com.google.api.gax.rpc.TransportChannelProvider
InstantiatingHttpJsonChannelProvider is a TransportChannelProvider which constructs aManagedHttpJsonChannelwith 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInstantiatingHttpJsonChannelProvider.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanacceptsPoolSize()Deprecated.REST transport channel doesn't support channel poolingStringgetEndpoint()The endpoint to be used for the channel.HttpJsonTransportChannelgetTransportChannel()StringgetTransportName()booleanneedsCredentials()booleanneedsEndpoint()booleanneedsExecutor()Deprecated.If executor is not set, this channel provider will create channels with default executor defined inManagedHttpJsonChannel.booleanneedsHeaders()static InstantiatingHttpJsonChannelProvider.BuildernewBuilder()booleanshouldAutoClose()InstantiatingHttpJsonChannelProvider.BuildertoBuilder()com.google.api.gax.rpc.TransportChannelProviderwithCredentials(com.google.auth.Credentials credentials)com.google.api.gax.rpc.TransportChannelProviderwithEndpoint(String endpoint)com.google.api.gax.rpc.TransportChannelProviderwithExecutor(Executor executor)com.google.api.gax.rpc.TransportChannelProviderwithExecutor(ScheduledExecutorService executor)Deprecated.com.google.api.gax.rpc.TransportChannelProviderwithHeaders(Map<String,String> headers)com.google.api.gax.rpc.TransportChannelProviderwithPoolSize(int size)Deprecated.REST transport channel doesn't support channel pooling
-
-
-
Method Detail
-
needsExecutor
@Deprecated public boolean needsExecutor()
Deprecated.If executor is not set, this channel provider will create channels with default executor defined inManagedHttpJsonChannel.- Specified by:
needsExecutorin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
withExecutor
@Deprecated public com.google.api.gax.rpc.TransportChannelProvider withExecutor(ScheduledExecutorService executor)
Deprecated.- Specified by:
withExecutorin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
withExecutor
public com.google.api.gax.rpc.TransportChannelProvider withExecutor(Executor executor)
- Specified by:
withExecutorin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
needsHeaders
public boolean needsHeaders()
- Specified by:
needsHeadersin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
withHeaders
public com.google.api.gax.rpc.TransportChannelProvider withHeaders(Map<String,String> headers)
- Specified by:
withHeadersin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
needsEndpoint
public boolean needsEndpoint()
- Specified by:
needsEndpointin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
withEndpoint
public com.google.api.gax.rpc.TransportChannelProvider withEndpoint(String endpoint)
- Specified by:
withEndpointin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
acceptsPoolSize
@Deprecated public boolean acceptsPoolSize()
Deprecated.REST transport channel doesn't support channel pooling- Specified by:
acceptsPoolSizein interfacecom.google.api.gax.rpc.TransportChannelProvider
-
withPoolSize
@Deprecated public com.google.api.gax.rpc.TransportChannelProvider withPoolSize(int size)
Deprecated.REST transport channel doesn't support channel pooling- Specified by:
withPoolSizein interfacecom.google.api.gax.rpc.TransportChannelProvider
-
getTransportName
public String getTransportName()
- Specified by:
getTransportNamein interfacecom.google.api.gax.rpc.TransportChannelProvider
-
getTransportChannel
public HttpJsonTransportChannel getTransportChannel() throws IOException
- Specified by:
getTransportChannelin interfacecom.google.api.gax.rpc.TransportChannelProvider- Throws:
IOException
-
needsCredentials
public boolean needsCredentials()
- Specified by:
needsCredentialsin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
withCredentials
public com.google.api.gax.rpc.TransportChannelProvider withCredentials(com.google.auth.Credentials credentials)
- Specified by:
withCredentialsin interfacecom.google.api.gax.rpc.TransportChannelProvider
-
getEndpoint
public String getEndpoint()
The endpoint to be used for the channel.
-
shouldAutoClose
public boolean shouldAutoClose()
- Specified by:
shouldAutoClosein interfacecom.google.api.gax.rpc.TransportChannelProvider
-
toBuilder
public InstantiatingHttpJsonChannelProvider.Builder toBuilder()
-
newBuilder
public static InstantiatingHttpJsonChannelProvider.Builder newBuilder()
-
-