public interface GrpcClient
API
: GrpcClientRequest
/GrpcClientResponse
with Protobuf messages to call any gRPC service in a generic wayrequest(SocketAddress, MethodDescriptor)
: GrpcClientRequest
/GrpcClientRequest
with gRPC messages to call a given method of a gRPC serviceModifier and Type | Method and Description |
---|---|
default <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.
|
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.
instead use
request(SocketAddress, MethodDescriptor) |
<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. |
static GrpcClient client(Vertx vertx)
vertx
- the vertx instancestatic GrpcClient client(Vertx vertx, GrpcClientOptions options)
vertx
- the vertx instancestatic GrpcClient client(Vertx vertx, HttpClientOptions options)
vertx
- the vertx instanceoptions
- the client optionsFuture<GrpcClientRequest<Buffer,Buffer>> request(SocketAddress server)
server
and create a request for any hosted gRPC service.server
- the server hosting the service@Deprecated <Req,Resp> Future<GrpcClientRequest<Req,Resp>> request(SocketAddress server, io.grpc.MethodDescriptor<Req,Resp> service)
request(SocketAddress, MethodDescriptor)
@Deprecated default <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)
GrpcIoClient.call(SocketAddress, MethodDescriptor, Handler, Function)
<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 methodCopyright © 2024 Eclipse. All rights reserved.