public class GrpcClient extends Object
#request(SocketAddress) API
: GrpcClientRequest
/GrpcClientResponse
with Protobuf messages to call any gRPC service in a generic wayrequest(io.vertx.rxjava.core.net.SocketAddress)
: GrpcClientRequest
/GrpcClientRequest
with gRPC messages to call a given method of a gRPC serviceoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<GrpcClient> |
__TYPE_ARG |
Constructor and Description |
---|
GrpcClient(GrpcClient delegate) |
GrpcClient(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>,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> |
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() |
public static final io.vertx.lang.rx.TypeArg<GrpcClient> __TYPE_ARG
public GrpcClient(GrpcClient delegate)
public GrpcClient(Object delegate)
public GrpcClient getDelegate()
public static GrpcClient client(Vertx vertx)
vertx
- the vertx instancepublic static GrpcClient client(Vertx vertx, GrpcClientOptions options)
vertx
- the vertx instanceoptions
- public static GrpcClient client(Vertx vertx, HttpClientOptions options)
vertx
- the vertx instanceoptions
- the client optionspublic Future<GrpcClientRequest<Buffer,Buffer>> request(SocketAddress server)
server
and create a request for any hosted gRPC service.server
- the server hosting the servicepublic Single<GrpcClientRequest<Buffer,Buffer>> rxRequest(SocketAddress server)
server
and create a request for any hosted gRPC service.server
- the server hosting the servicepublic <Req,Resp> Future<GrpcClientRequest<Req,Resp>> request(SocketAddress server, ServiceMethod<Resp,Req> method)
server
and create a request for any hosted gRPC service.server
- the server hosting the servicemethod
- the grpc methodpublic <Req,Resp> Single<GrpcClientRequest<Req,Resp>> rxRequest(SocketAddress server, ServiceMethod<Resp,Req> method)
server
and create a request for any hosted gRPC service.server
- the server hosting the servicemethod
- the grpc method@Deprecated public <Req,Resp> Future<GrpcClientRequest<Req,Resp>> request(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service)
server
- service
- @Deprecated public <Req,Resp> Single<GrpcClientRequest<Req,Resp>> rxRequest(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service)
server
- service
- @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)
server
- service
- requestHandler
- resultFn
- @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)
server
- service
- requestHandler
- resultFn
- public static GrpcClient newInstance(GrpcClient arg)
Copyright © 2024 Eclipse. All rights reserved.