io.vertx.rxjava.grpc.client

## Class GrpcClient

- java.lang.Object
- - io.vertx.rxjava.grpc.client.GrpcClient

- All Implemented Interfaces:
    io.vertx.lang.rx.RxDelegate
  Direct Known Subclasses:
    GrpcIoClient

      public class GrpcClient
      extends Object
      implements io.vertx.lang.rx.RxDelegate

  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 exposes 2 levels of API
  - a Protobuf message `#request(SocketAddress) API`: `GrpcClientRequest`/`GrpcClientResponse` with Protobuf messages to call any gRPC service in a generic way
  - a gRPC message `request(io.vertx.rxjava.core.net.SocketAddress)`: `GrpcClientRequest`/`GrpcClientRequest` with gRPC messages to call a given method of a gRPC service

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<GrpcClient>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GrpcClient(GrpcClient delegate)`
    `GrpcClient(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `<Req,Resp,T> Future<T>` | `call(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, java.util.function.Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)` Deprecated.
    `static GrpcClient` | `client(Vertx vertx)` Create a new client
    `static GrpcClient` | `client(Vertx vertx, GrpcClientOptions options)` Create a new client
    `static GrpcClient` | `client(Vertx vertx, HttpClientOptions options)` Create a new client
    `Future<Void>` | `close()` Close this client.
    `boolean` | `equals(Object o)`
    `GrpcClient` | `getDelegate()`
    `int` | `hashCode()`
    `static GrpcClient` | `newInstance(GrpcClient arg)`
    `Future<GrpcClientRequest<Buffer,Buffer>>` | `request(SocketAddress server)` Connect to the remote `server` and create a request for any hosted gRPC service.
    `<Req,Resp> Future<GrpcClientRequest<Req,Resp>>` | `request(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service)` Deprecated.
    `<Req,Resp> Future<GrpcClientRequest<Req,Resp>>` | `request(SocketAddress server, ServiceMethod<Resp,Req> method)` Connect to the remote `server` and create a request for any hosted gRPC service.
    `<Req,Resp,T> Single<T>` | `rxCall(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, java.util.function.Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)` Deprecated.
    `Single<Void>` | `rxClose()` Close this client.
    `Single<GrpcClientRequest<Buffer,Buffer>>` | `rxRequest(SocketAddress server)` Connect to the remote `server` and create a request for any hosted gRPC service.
    `<Req,Resp> Single<GrpcClientRequest<Req,Resp>>` | `rxRequest(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service)` Deprecated.
    `<Req,Resp> Single<GrpcClientRequest<Req,Resp>>` | `rxRequest(SocketAddress server, ServiceMethod<Resp,Req> method)` Connect to the remote `server` and create a request for any hosted gRPC service.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<GrpcClient> __TYPE_ARG

  - ### Constructor Detail

    - #### GrpcClient

          public GrpcClient(GrpcClient delegate)

    - #### GrpcClient

          public GrpcClient(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public GrpcClient getDelegate()

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### client

          public static GrpcClient client(Vertx vertx)

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

    - #### client

          public static GrpcClient client(Vertx vertx,
                                          GrpcClientOptions options)

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

    - #### client

          public static GrpcClient client(Vertx vertx,
                                          HttpClientOptions options)

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

    - #### request

          public Future<GrpcClientRequest<Buffer,Buffer>> request(SocketAddress 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

    - #### rxRequest

          public Single<GrpcClientRequest<Buffer,Buffer>> rxRequest(SocketAddress 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

          public <Req,Resp> Future<GrpcClientRequest<Req,Resp>> request(SocketAddress 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

    - #### rxRequest

          public <Req,Resp> Single<GrpcClientRequest<Req,Resp>> rxRequest(SocketAddress 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

    - #### close

          public Future<Void> close()

      Close this client.
      Returns:

    - #### rxClose

          public Single<Void> rxClose()

      Close this client.
      Returns:

    - #### request

          @Deprecated
          public <Req,Resp> Future<GrpcClientRequest<Req,Resp>> request(SocketAddress server,
                                                                                    io.grpc.MethodDescriptor<Req,Resp> service)

      Deprecated.
      Parameters:
        `server` -
        `service` -
      Returns:

    - #### rxRequest

          @Deprecated
          public <Req,Resp> Single<GrpcClientRequest<Req,Resp>> rxRequest(SocketAddress server,
                                                                                      io.grpc.MethodDescriptor<Req,Resp> service)

      Deprecated.
      Parameters:
        `server` -
        `service` -
      Returns:

    - #### call

          @Deprecated
          public <Req,Resp,T> Future<T> call(SocketAddress server,
                                                         io.grpc.MethodDescriptor<Req,Resp> service,
                                                         Handler<GrpcClientRequest<Req,Resp>> requestHandler,
                                                         java.util.function.Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)

      Deprecated.
      Parameters:
        `server` -
        `service` -
        `requestHandler` -
        `resultFn` -
      Returns:

    - #### rxCall

          @Deprecated
          public <Req,Resp,T> Single<T> rxCall(SocketAddress server,
                                                           io.grpc.MethodDescriptor<Req,Resp> service,
                                                           Handler<GrpcClientRequest<Req,Resp>> requestHandler,
                                                           java.util.function.Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)

      Deprecated.
      Parameters:
        `server` -
        `service` -
        `requestHandler` -
        `resultFn` -
      Returns:

    - #### newInstance

          public static GrpcClient newInstance(GrpcClient arg)

Copyright © 2025 Eclipse. All rights reserved.