Interface GrpcClient

All Superinterfaces:
RuntimeType.Api<GrpcClientConfig>

public interface GrpcClient extends RuntimeType.Api<GrpcClientConfig>
gRPC client.
  • Field Details

  • 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