java.lang.Object
io.helidon.grpc.client.GrpcChannelDescriptor.Builder
- All Implemented Interfaces:
Builder<GrpcChannelDescriptor.Builder,
,GrpcChannelDescriptor> Supplier<GrpcChannelDescriptor>
- Enclosing class:
- GrpcChannelDescriptor
public static class GrpcChannelDescriptor.Builder
extends Object
implements Builder<GrpcChannelDescriptor.Builder,GrpcChannelDescriptor>
Builder builds a GrpcChannelDescriptor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build and return a new GrpcChannelDescriptor.Set the host name to connect.Set the host name to connect.loadBalancerPolicy
(String policy) Set the default load balancer policy name.nameResolverFactory
(io.grpc.NameResolver.Factory factory) Deprecated.port
(int port) Set the port that will be used to connect to the server.sslDescriptor
(GrpcTlsDescriptor tlsDescriptor) Set the GrpcTlsDescriptor.Set the target string, which can be either a validNameResolver
compliant URI, or an authority string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
inProcess
Set the host name to connect.- Returns:
- this instance for fluent API
-
target
Set the target string, which can be either a validNameResolver
compliant URI, or an authority string.- Parameters:
target
- the target string- Returns:
- this instance for fluent API
- See Also:
-
ManagedChannelBuilder.forTarget(String)
-
host
Set the host name to connect.- Parameters:
host
- set the host name- Returns:
- this instance for fluent API
-
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
Set the GrpcTlsDescriptor. IftlsDescriptor
is null or if thetlsDescriptor.isEnabled()
is false, then no TLS will be used.- Parameters:
tlsDescriptor
- the GrpcSslDescriptor- Returns:
- this instance for fluent API
-
loadBalancerPolicy
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 theNameResolver.Factory
to use.- Parameters:
factory
- theNameResolver.Factory
to useThis 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)
-
build
Build and return a new GrpcChannelDescriptor.- Specified by:
build
in interfaceBuilder<GrpcChannelDescriptor.Builder,
GrpcChannelDescriptor> - Returns:
- a new GrpcChannelDescriptor
-