Interface GrpcClient

All Superinterfaces:
io.helidon.builder.api.RuntimeType.Api<GrpcClientConfig>

public interface GrpcClient extends io.helidon.builder.api.RuntimeType.Api<GrpcClientConfig>
gRPC client.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.helidon.webclient.spi.Protocol<GrpcClient,GrpcClientProtocolConfig>
    Protocol to use to obtain an instance of gRPC specific client from WebClient.client(io.helidon.webclient.spi.Protocol).
    static final String
    Protocol ID constant for gRPC.
  • Method Summary

    Modifier and Type
    Method
    Description
    A new fluent API builder to customize client setup.
    io.grpc.Channel
    Create a gRPC channel for this client that can be used to create stubs.
    io.grpc.Channel
    channel(io.grpc.ClientInterceptor... interceptors)
    Create a gRPC channel for this client that can be used to create stubs.
    default io.grpc.Channel
    channel(Collection<io.grpc.ClientInterceptor> interceptors)
    Create a gRPC channel for this client that can be used to create stubs.
    Configuration for this gRPC client.
    static GrpcClient
    Create a new instance with default configuration.
    static GrpcClient
    create(GrpcClientConfig clientConfig)
    Create a new instance with custom configuration.
    static GrpcClient
    Create a new instance customizing its configuration.
    Create a client for a specific service.

    Methods inherited from interface io.helidon.builder.api.RuntimeType.Api

    prototype
  • Field Details

    • PROTOCOL_ID

      static final String PROTOCOL_ID
      Protocol ID constant for gRPC.
      See Also:
    • PROTOCOL

      static final io.helidon.webclient.spi.Protocol<GrpcClient,GrpcClientProtocolConfig> PROTOCOL
      Protocol to use to obtain an instance of gRPC specific client from WebClient.client(io.helidon.webclient.spi.Protocol).
  • Method Details

    • builder

      static GrpcClientConfig.Builder builder()
      A new fluent API builder to customize client setup.
      Returns:
      a new builder
    • create

      static GrpcClient create(GrpcClientConfig clientConfig)
      Create a new instance with custom configuration.
      Parameters:
      clientConfig - HTTP/2 client configuration
      Returns:
      a new HTTP/2 client
    • create

      static GrpcClient create(Consumer<GrpcClientConfig.Builder> consumer)
      Create a new instance customizing its configuration.
      Parameters:
      consumer - HTTP/2 client configuration
      Returns:
      a new HTTP/2 client
    • create

      static GrpcClient create()
      Create a new instance with default configuration.
      Returns:
      a new HTTP/2 client
    • serviceClient

      GrpcServiceClient serviceClient(GrpcServiceDescriptor descriptor)
      Create a client for a specific service. The client will be backed by the same HTTP/2 client.
      Parameters:
      descriptor - descriptor to use
      Returns:
      client for the provided descriptor
    • channel

      io.grpc.Channel channel()
      Create a gRPC channel for this client that can be used to create stubs.
      Returns:
      a new gRPC channel
    • channel

      io.grpc.Channel channel(io.grpc.ClientInterceptor... interceptors)
      Create a gRPC channel for this client that can be used to create stubs.
      Parameters:
      interceptors - the array of client interceptors
      Returns:
      a new gRPC channel
    • channel

      default io.grpc.Channel channel(Collection<io.grpc.ClientInterceptor> interceptors)
      Create a gRPC channel for this client that can be used to create stubs.
      Parameters:
      interceptors - the list of client interceptors
      Returns:
      a new gRPC channel
    • clientConfig

      GrpcClientConfig clientConfig()
      Configuration for this gRPC client.
      Returns:
      the configuration