Class GrpcIoClient
- java.lang.Object
-
- io.vertx.reactivex.grpc.client.GrpcClient
-
- io.vertx.reactivex.grpcio.client.GrpcIoClient
-
- All Implemented Interfaces:
RxDelegate
public class GrpcIoClient extends GrpcClient implements 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 theoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<GrpcIoClient>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description GrpcIoClient(GrpcIoClient delegate)GrpcIoClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <Req,Resp,T>
Future<T>call(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, io.reactivex.functions.Function<GrpcClientResponse<Req,Resp>,io.reactivex.Single<T>> resultFn)Call theservicegRPC service hosted byserver.<Req,Resp,T>
Future<T>call(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)Call theservicegRPC service hosted byserver.static GrpcIoClientclient(Vertx vertx)Create a new clientstatic GrpcIoClientclient(Vertx vertx, HttpClientOptions options)Create a new clientstatic GrpcIoClientclient(Vertx vertx, GrpcClientOptions options)Create a new clientbooleanequals(Object o)GrpcIoClientgetDelegate()inthashCode()static GrpcIoClientnewInstance(GrpcIoClient arg)<Req,Resp,T>
io.reactivex.Single<T>rxCall(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, io.reactivex.functions.Function<GrpcClientResponse<Req,Resp>,io.reactivex.Single<T>> resultFn)Call theservicegRPC service hosted byserver.<Req,Resp,T>
io.reactivex.Single<T>rxCall(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)Call theservicegRPC service hosted byserver.StringtoString()-
Methods inherited from class io.vertx.reactivex.grpc.client.GrpcClient
close, newInstance, request, request, request, rxClose, rxRequest, rxRequest, rxRequest
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<GrpcIoClient> __TYPE_ARG
-
-
Constructor Detail
-
GrpcIoClient
public GrpcIoClient(GrpcIoClient delegate)
-
GrpcIoClient
public GrpcIoClient(Object delegate)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classGrpcClient
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classGrpcClient
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGrpcClient
-
getDelegate
public GrpcIoClient getDelegate()
- Specified by:
getDelegatein interfaceRxDelegate- Overrides:
getDelegatein classGrpcClient
-
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 instanceoptions-- Returns:
- the created client
-
client
public static GrpcIoClient client(Vertx vertx, HttpClientOptions options)
Create a new client- Parameters:
vertx- the vertx instanceoptions- the client options- Returns:
- the created client
-
call
public <Req,Resp,T> Future<T> call(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)
Call theservicegRPC service hosted byserver.The
requestHandleris called to send the request, e.g.req -> req.send(item)The
responseFunctionextracts the result, e.g.resp -> resp.last()It can be used in various ways:
Futurefut = client.call(..., req -> req.send(item), resp -> resp.last()); Futurefut = client.call(..., req -> req.send(stream), resp -> resp.pipeTo(anotherService)); Future- > fut = client.call(..., req -> req.send(stream), resp -> resp.collecting(Collectors.toList()));
- Overrides:
callin classGrpcClient- Parameters:
server- the server hosting the serviceservice- the service to callrequestHandler- the handler called to send the requestresultFn- the function applied to extract the result.- Returns:
- a future of the result
-
rxCall
public <Req,Resp,T> io.reactivex.Single<T> rxCall(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, Function<GrpcClientResponse<Req,Resp>,Future<T>> resultFn)
Call theservicegRPC service hosted byserver.The
requestHandleris called to send the request, e.g.req -> req.send(item)The
responseFunctionextracts the result, e.g.resp -> resp.last()It can be used in various ways:
Futurefut = client.call(..., req -> req.send(item), resp -> resp.last()); Futurefut = client.call(..., req -> req.send(stream), resp -> resp.pipeTo(anotherService)); Future- > fut = client.call(..., req -> req.send(stream), resp -> resp.collecting(Collectors.toList()));
- Overrides:
rxCallin classGrpcClient- Parameters:
server- the server hosting the serviceservice- the service to callrequestHandler- the handler called to send the requestresultFn- the function applied to extract the result.- Returns:
- a future of the result
-
call
public <Req,Resp,T> Future<T> call(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, io.reactivex.functions.Function<GrpcClientResponse<Req,Resp>,io.reactivex.Single<T>> resultFn)
Call theservicegRPC service hosted byserver.The
requestHandleris called to send the request, e.g.req -> req.send(item)The
responseFunctionextracts the result, e.g.resp -> resp.last()It can be used in various ways:
Futurefut = client.call(..., req -> req.send(item), resp -> resp.last()); Futurefut = client.call(..., req -> req.send(stream), resp -> resp.pipeTo(anotherService)); Future- > fut = client.call(..., req -> req.send(stream), resp -> resp.collecting(Collectors.toList()));
- Overrides:
callin classGrpcClient- Parameters:
server- the server hosting the serviceservice- the service to callrequestHandler- the handler called to send the requestresultFn- the function applied to extract the result.- Returns:
- a future of the result
-
rxCall
public <Req,Resp,T> io.reactivex.Single<T> rxCall(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service, Handler<GrpcClientRequest<Req,Resp>> requestHandler, io.reactivex.functions.Function<GrpcClientResponse<Req,Resp>,io.reactivex.Single<T>> resultFn)
Call theservicegRPC service hosted byserver.The
requestHandleris called to send the request, e.g.req -> req.send(item)The
responseFunctionextracts the result, e.g.resp -> resp.last()It can be used in various ways:
Futurefut = client.call(..., req -> req.send(item), resp -> resp.last()); Futurefut = client.call(..., req -> req.send(stream), resp -> resp.pipeTo(anotherService)); Future- > fut = client.call(..., req -> req.send(stream), resp -> resp.collecting(Collectors.toList()));
- Overrides:
rxCallin classGrpcClient- Parameters:
server- the server hosting the serviceservice- the service to callrequestHandler- the handler called to send the requestresultFn- the function applied to extract the result.- Returns:
- a future of the result
-
newInstance
public static GrpcIoClient newInstance(GrpcIoClient arg)
-
-