Class InstantiatingHttpJsonChannelProvider

  • All Implemented Interfaces:
    com.google.api.gax.rpc.TransportChannelProvider

    @BetaApi
    @InternalExtensionOnly
    public final class InstantiatingHttpJsonChannelProvider
    extends java.lang.Object
    implements com.google.api.gax.rpc.TransportChannelProvider
    InstantiatingHttpJsonChannelProvider 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.

    • Method Detail

      • needsExecutor

        @Deprecated
        public boolean needsExecutor()
        Deprecated.
        If executor is not set, this channel provider will create channels with default executor defined in ManagedHttpJsonChannel.
        Specified by:
        needsExecutor in interface com.google.api.gax.rpc.TransportChannelProvider
      • withExecutor

        @Deprecated
        public com.google.api.gax.rpc.TransportChannelProvider withExecutor​(java.util.concurrent.ScheduledExecutorService executor)
        Deprecated.
        Specified by:
        withExecutor in interface com.google.api.gax.rpc.TransportChannelProvider
      • withExecutor

        public com.google.api.gax.rpc.TransportChannelProvider withExecutor​(java.util.concurrent.Executor executor)
        Specified by:
        withExecutor in interface com.google.api.gax.rpc.TransportChannelProvider
      • needsHeaders

        public boolean needsHeaders()
        Specified by:
        needsHeaders in interface com.google.api.gax.rpc.TransportChannelProvider
      • withHeaders

        public com.google.api.gax.rpc.TransportChannelProvider withHeaders​(java.util.Map<java.lang.String,​java.lang.String> headers)
        Specified by:
        withHeaders in interface com.google.api.gax.rpc.TransportChannelProvider
      • needsEndpoint

        public boolean needsEndpoint()
        Specified by:
        needsEndpoint in interface com.google.api.gax.rpc.TransportChannelProvider
      • withEndpoint

        public com.google.api.gax.rpc.TransportChannelProvider withEndpoint​(java.lang.String endpoint)
        Specified by:
        withEndpoint in interface com.google.api.gax.rpc.TransportChannelProvider
      • acceptsPoolSize

        @Deprecated
        public boolean acceptsPoolSize()
        Deprecated.
        REST transport channel doesn't support channel pooling
        Specified by:
        acceptsPoolSize in interface com.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:
        withPoolSize in interface com.google.api.gax.rpc.TransportChannelProvider
      • getTransportName

        public java.lang.String getTransportName()
        Specified by:
        getTransportName in interface com.google.api.gax.rpc.TransportChannelProvider
      • getTransportChannel

        public HttpJsonTransportChannel getTransportChannel()
                                                     throws java.io.IOException
        Specified by:
        getTransportChannel in interface com.google.api.gax.rpc.TransportChannelProvider
        Throws:
        java.io.IOException
      • needsCredentials

        public boolean needsCredentials()
        Specified by:
        needsCredentials in interface com.google.api.gax.rpc.TransportChannelProvider
      • withCredentials

        public com.google.api.gax.rpc.TransportChannelProvider withCredentials​(com.google.auth.Credentials credentials)
        Specified by:
        withCredentials in interface com.google.api.gax.rpc.TransportChannelProvider
      • getEndpoint

        public java.lang.String getEndpoint()
        The endpoint to be used for the channel.
      • shouldAutoClose

        public boolean shouldAutoClose()
        Specified by:
        shouldAutoClose in interface com.google.api.gax.rpc.TransportChannelProvider