io.vertx.rxjava3.grpcio.client

## Class GrpcIoClient

- java.lang.Object
- - io.vertx.rxjava3.grpc.client.GrpcClient
  - - io.vertx.rxjava3.grpcio.client.GrpcIoClient

- All Implemented Interfaces:
    io.vertx.lang.rx.RxDelegate

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

  Extends the so it can be utilized with .

  In Vert.x 5, the core is decoupled from `io.grpc.*` packages to support JPMS.

  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<GrpcIoClient>` | `__TYPE_ARG`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<Req,Resp,T> Single<T>` | `call(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, java.util.function.Function<GrpcClientResponse<Req,Resp>,Single<T>> resultFn)` Call the `service` gRPC service hosted by `server`.
    `static GrpcIoClient` | `client(Vertx vertx)` Create a new client
    `static GrpcIoClient` | `client(Vertx vertx, GrpcClientOptions options)` Create a new client
    `static GrpcIoClient` | `client(Vertx vertx, HttpClientOptions options)` Create a new client
    `boolean` | `equals(Object o)`
    `GrpcIoClient` | `getDelegate()`
    `int` | `hashCode()`
    `static GrpcIoClient` | `newInstance(GrpcIoClient arg)`
    `<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>,Single<T>> resultFn)` Call the `service` gRPC service hosted by `server`.
    `String` | `toString()`

    - ### Methods inherited from class io.vertx.rxjava3.grpc.client.GrpcClient

      `close, newInstance, request, request, request, rxClose, rxRequest, rxRequest, rxRequest`

    - ### 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<GrpcIoClient> __TYPE_ARG

  - ### Constructor Detail

    - #### GrpcIoClient

          public GrpcIoClient(GrpcIoClient delegate)

    - #### GrpcIoClient

          public GrpcIoClient(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `GrpcClient`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `GrpcClient`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `GrpcClient`

    - #### getDelegate

          public GrpcIoClient getDelegate()

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

    - #### client

          public static GrpcIoClient client(Vertx vertx)

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

    - #### client

          public static GrpcIoClient client(Vertx vertx,
                                            GrpcClientOptions options)

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

    - #### client

          public static GrpcIoClient client(Vertx vertx,
                                            HttpClientOptions options)

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

    - #### call

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

      Call the `service` gRPC service hosted by `server`.

      The `requestHandler` is called to send the request, e.g. `req -> req.send(item)`

      The `responseFunction` extracts the result, e.g. `resp -> resp.last()`

      It can be used in various ways:

      - `Future fut = client.call(..., req -> req.send(item), resp -> resp.last());`
      - `Future fut = client.call(..., req -> req.send(stream), resp -> resp.pipeTo(anotherService));`
      - `Future> fut = client.call(..., req -> req.send(stream), resp -> resp.collecting(Collectors.toList()));`

      Overrides:
        `call` in class `GrpcClient`
      Parameters:
        `server` - the server hosting the service
        `service` - the service to call
        `requestHandler` - the handler called to send the request
        `resultFn` - the function applied to extract the result.
      Returns:
        a future of the result

    - #### rxCall

          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>,Single<T>> resultFn)

      Call the `service` gRPC service hosted by `server`.

      The `requestHandler` is called to send the request, e.g. `req -> req.send(item)`

      The `responseFunction` extracts the result, e.g. `resp -> resp.last()`

      It can be used in various ways:

      - `Future fut = client.call(..., req -> req.send(item), resp -> resp.last());`
      - `Future fut = client.call(..., req -> req.send(stream), resp -> resp.pipeTo(anotherService));`
      - `Future> fut = client.call(..., req -> req.send(stream), resp -> resp.collecting(Collectors.toList()));`

      Overrides:
        `rxCall` in class `GrpcClient`
      Parameters:
        `server` - the server hosting the service
        `service` - the service to call
        `requestHandler` - the handler called to send the request
        `resultFn` - the function applied to extract the result.
      Returns:
        a future of the result

    - #### newInstance

          public static GrpcIoClient newInstance(GrpcIoClient arg)

Copyright © 2025 Eclipse. All rights reserved.