Package io.vertx.grpc.client

## Interface GrpcClient

- All Known Subinterfaces:
    `GrpcIoClient`

      public interface GrpcClient

  A gRPC client for Vert.x

  Unlike traditional gRPC clients, this client does not rely on a generated RPC interface to interact with the service.

  Instead, you can interact with the service with a request/response interfaces and gRPC messages, very much like a traditional client.

  The client handles only the gRPC protocol and does not encode/decode protobuf messages.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static GrpcClientBuilder<GrpcClient>` | `builder​(Vertx vertx)` | Provide a builder for `GrpcClient`, it can be used to configure advanced client settings like a load balancer or an address resolver.
    `static GrpcClient` | `client​(Vertx vertx)` | Create a client.
    `static GrpcClient` | `client​(Vertx vertx, HttpClient client)` | Create a client wrapping an existing `HttpClient`.
    `static GrpcClient` | `client​(Vertx vertx, HttpClientOptions options)` | Create a client with the specified `options`.
    `static GrpcClient` | `client​(Vertx vertx, GrpcClientOptions options)` | Create a client.
    `static GrpcClient` | `client​(Vertx vertx, GrpcClientOptions grpcOptions, HttpClientOptions httpOptions)` | Create a client with the specified `options`.
    `Future<Void>` | `close()` | Close this client.
    `Future<GrpcClientRequest<Buffer,​Buffer>>` | `request()` | Like `request(Address)` with the default remote server.
    `Future<GrpcClientRequest<Buffer,​Buffer>>` | `request​(Address server)` | Connect to the remote `server` and create a request for any hosted gRPC service.
    `<Req,​Resp> Future<GrpcClientRequest<Req,​Resp>>` | `request​(Address server, ServiceMethod<Resp,​Req> method)` | Connect to the remote `server` and create a request for any hosted gRPC service.
    `<Req,​Resp> Future<GrpcClientRequest<Req,​Resp>>` | `request​(ServiceMethod<Resp,​Req> method)` | Like `request(Address, ServiceMethod)` with the default remote server.

- - ### Method Detail

    - #### builder

          static GrpcClientBuilder<GrpcClient> builder​(Vertx vertx)

      Provide a builder for `GrpcClient`, it can be used to configure advanced client settings like a load balancer or an address resolver.

      Example usage: `GrpcClient client = GrpcClient.builder(vertx).with(options)...build()`

    - #### client

          static GrpcClient client​(Vertx vertx)

      Create a client.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the created client

    - #### client

          static GrpcClient client​(Vertx vertx,
                                   GrpcClientOptions options)

      Create a client.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the created client

    - #### client

          static GrpcClient client​(Vertx vertx,
                                   GrpcClientOptions grpcOptions,
                                   HttpClientOptions httpOptions)

      Create a client with the specified `options`.
      Parameters:
        `vertx` - the vertx instance
        `grpcOptions` - the http client options
        `httpOptions` - the http client options
      Returns:
        the created client

    - #### client

          static GrpcClient client​(Vertx vertx,
                                   HttpClientOptions options)

      Create a client with the specified `options`.
      Parameters:
        `vertx` - the vertx instance
        `options` - the http client options
      Returns:
        the created client

    - #### client

          static GrpcClient client​(Vertx vertx,
                                   HttpClient client)

      Create a client wrapping an existing `HttpClient`.
      Parameters:
        `vertx` - the vertx instance
        `client` - the http client instance
      Returns:
        the created client

    - #### request

          Future<GrpcClientRequest<Buffer,​Buffer>> request​(Address server)

      Connect to the remote `server` and create a request for any hosted gRPC service.
      Parameters:
        `server` - the server hosting the service
      Returns:
        a future request

    - #### request

          Future<GrpcClientRequest<Buffer,​Buffer>> request()

      Like `request(Address)` with the default remote server.

    - #### request

          <Req,​Resp> Future<GrpcClientRequest<Req,​Resp>> request​(Address server,
                                                                             ServiceMethod<Resp,​Req> method)

      Connect to the remote `server` and create a request for any hosted gRPC service.
      Parameters:
        `server` - the server hosting the service
        `method` - the grpc method
      Returns:
        a future request

    - #### request

          <Req,​Resp> Future<GrpcClientRequest<Req,​Resp>> request​(ServiceMethod<Resp,​Req> method)

      Like `request(Address, ServiceMethod)` with the default remote server.

    - #### close

          Future<Void> close()

      Close this client.