Package io.helidon.grpc.client
Class GrpcChannelDescriptor
- java.lang.Object
-
- io.helidon.grpc.client.GrpcChannelDescriptor
-
public class GrpcChannelDescriptor extends Object
GrpcChannelDescriptor contains the configuration for aChannel
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GrpcChannelDescriptor.Builder
Builder builds a GrpcChannelDescriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GrpcChannelDescriptor.Builder
builder()
Create and return a newGrpcChannelDescriptor.Builder
.String
host()
Get the host name to connect.boolean
isInProcessChannel()
Checks if this is a descriptor for building a in processChannel
.Optional<String>
loadBalancerPolicy()
Get the default load balancer policy to use.Optional<io.grpc.NameResolver.Factory>
nameResolverFactory()
Get theNameResolver.Factory
to use.int
port()
Get the port that will be used to connect to the server.Optional<String>
target()
Get the optional target string to use to resolve channel addresses.Optional<GrpcTlsDescriptor>
tlsDescriptor()
Get theGrpcTlsDescriptor
.
-
-
-
Method Detail
-
builder
public static GrpcChannelDescriptor.Builder builder()
Create and return a newGrpcChannelDescriptor.Builder
.- Returns:
- a new
GrpcChannelDescriptor.Builder
-
isInProcessChannel
public boolean isInProcessChannel()
Checks if this is a descriptor for building a in processChannel
.- Returns:
- true if this is a descriptor for building a in process
Channel
-
host
public String host()
Get the host name to connect.- Returns:
- the host name to connect
-
port
public int port()
Get the port that will be used to connect to the server.- Returns:
- the port that will be used to connect to the server
-
target
public Optional<String> target()
Get the optional target string to use to resolve channel addresses.- Returns:
- the optional target string to use to resolve channel addresses
-
loadBalancerPolicy
public Optional<String> loadBalancerPolicy()
Get the default load balancer policy to use.- Returns:
- the optional default load balancer policy to use
-
nameResolverFactory
public Optional<io.grpc.NameResolver.Factory> nameResolverFactory()
Get theNameResolver.Factory
to use.- Returns:
- the optional
NameResolver.Factory
to use
-
tlsDescriptor
public Optional<GrpcTlsDescriptor> tlsDescriptor()
Get theGrpcTlsDescriptor
. If this method returns null or iftlsDescriptor.isEnabled()
is false, then no TLS will be used (and none of the other configuration values fromtlsDescriptor
will be used).If the
GrpcTlsDescriptor
has been set but the value ofGrpcTlsDescriptor.isEnabled()
returnsfalse
then an emptyOptional
will be returned.- Returns:
- the optional
GrpcTlsDescriptor
-
-