Class GrpcChannelDescriptor.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • target

        public GrpcChannelDescriptor.Builder target​(String target)
        Set the target string, which can be either a valid NameResolver compliant URI, or an authority string.
        Parameters:
        target - the target string
        Returns:
        this instance for fluent API
        See Also:
        ManagedChannelBuilder.forTarget(String)
      • port

        public GrpcChannelDescriptor.Builder port​(int port)
        Set the port that will be used to connect to the server.
        Parameters:
        port - the port that will be used to connect to the server
        Returns:
        this instance for fluent API
      • sslDescriptor

        public GrpcChannelDescriptor.Builder sslDescriptor​(GrpcTlsDescriptor tlsDescriptor)
        Set the GrpcTlsDescriptor. If tlsDescriptor is null or if the tlsDescriptor.isEnabled() is false, then no TLS will be used.
        Parameters:
        tlsDescriptor - the GrpcSslDescriptor
        Returns:
        this instance for fluent API
      • loadBalancerPolicy

        public GrpcChannelDescriptor.Builder loadBalancerPolicy​(String policy)
        Set the default load balancer policy name.
        Parameters:
        policy - the load balancer policy name
        Returns:
        this instance for fluent API
        See Also:
        ManagedChannelBuilder.defaultLoadBalancingPolicy(String)
      • nameResolverFactory

        @Deprecated
        public GrpcChannelDescriptor.Builder nameResolverFactory​(io.grpc.NameResolver.Factory factory)
        Deprecated.
        Set the NameResolver.Factory to use.
        Parameters:
        factory - the NameResolver.Factory to use

        This method is deprecated due to the deprecation of the ManagedChannelBuilder.nameResolverFactory(io.grpc.NameResolver.Factory) method in the gRPC Java API.

        Returns:
        this instance for fluent API
        See Also:
        ManagedChannelBuilder.nameResolverFactory(io.grpc.NameResolver.Factory)