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 theoriginal non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<GrpcIoClient> |
__TYPE_ARG |
| Constructor and Description |
|---|
GrpcIoClient(GrpcIoClient delegate) |
GrpcIoClient(Object delegate) |
| Modifier and Type | Method and Description |
|---|---|
<Req,Resp,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> |
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() |
close, newInstance, request, request, request, rxClose, rxRequest, rxRequest, rxRequestpublic static final io.vertx.lang.rx.TypeArg<GrpcIoClient> __TYPE_ARG
public GrpcIoClient(GrpcIoClient delegate)
public GrpcIoClient(Object delegate)
public String toString()
toString in class GrpcClientpublic boolean equals(Object o)
equals in class GrpcClientpublic int hashCode()
hashCode in class GrpcClientpublic GrpcIoClient getDelegate()
getDelegate in interface io.vertx.lang.rx.RxDelegategetDelegate in class GrpcClientpublic static GrpcIoClient client(Vertx vertx)
vertx - the vertx instancepublic static GrpcIoClient client(Vertx vertx, GrpcClientOptions options)
vertx - the vertx instanceoptions - public static GrpcIoClient client(Vertx vertx, HttpClientOptions options)
vertx - the vertx instanceoptions - the client optionspublic <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)
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()));
call in class GrpcClientserver - the server hosting the serviceservice - the service to callrequestHandler - the handler called to send the requestresultFn - the function applied to extract the result.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)
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()));
rxCall in class GrpcClientserver - the server hosting the serviceservice - the service to callrequestHandler - the handler called to send the requestresultFn - the function applied to extract the result.public static GrpcIoClient newInstance(GrpcIoClient arg)
Copyright © 2025 Eclipse. All rights reserved.