Package io.vertx.rxjava3.grpc.client
Class GrpcClient
java.lang.Object
io.vertx.rxjava3.grpc.client.GrpcClient
- All Implemented Interfaces:
RxDelegate
A gRPC client for Vert.x
Unlike traditional gRPC clients, this client does not rely on a generated RPC interface to interact with the service.
Instead, you can interact with the service with a request/response interfaces and gRPC messages, very much like a traditional client.
The client handles only the gRPC protocol and does not encode/decode protobuf messages.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcClientBuilder<GrpcClient>builder(io.vertx.rxjava3.core.Vertx vertx) Provide a builder forGrpcClient, it can be used to configure advanced client settings like a load balancer or an address resolver.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx) Create a client.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx, HttpClientOptions options) Create a client with the specifiedoptions.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx, ClientSSLOptions sslOptions) Create a client with the specifiedsslOptions.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx, GrpcClientOptions options) Create a client.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx, GrpcClientOptions grpcOptions, HttpClientOptions httpOptions) Create a client with the specifiedoptions.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx, GrpcClientOptions grpcOptions, ClientSSLOptions sslOptions) Create a client with the specifiedsslOptions.static GrpcClientclient(io.vertx.rxjava3.core.Vertx vertx, HttpClient client) Create a client wrapping an existing .io.reactivex.rxjava3.core.Completableclose()Close this client.booleaninthashCode()static GrpcClientnewInstance(GrpcClient arg) io.reactivex.rxjava3.core.Single<GrpcClientRequest<Buffer,Buffer>> request()Likerequest(io.vertx.core.net.Address)with the default remote server.io.reactivex.rxjava3.core.Single<GrpcClientRequest<Buffer,Buffer>> Connect to the remoteserverand create a request for any hosted gRPC service.<Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req, Resp>> request(Address server, ServiceMethod<Resp, Req> method) Connect to the remoteserverand create a request for any hosted gRPC service.<Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req, Resp>> request(ServiceMethod<Resp, Req> method) Likerequest(io.vertx.core.net.Address)with the default remote server.io.reactivex.rxjava3.core.CompletablerxClose()Close this client.io.reactivex.rxjava3.core.Single<GrpcClientRequest<Buffer,Buffer>> Likerequest(io.vertx.core.net.Address)with the default remote server.io.reactivex.rxjava3.core.Single<GrpcClientRequest<Buffer,Buffer>> Connect to the remoteserverand create a request for any hosted gRPC service.<Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req, Resp>> rxRequest(Address server, ServiceMethod<Resp, Req> method) Connect to the remoteserverand create a request for any hosted gRPC service.<Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req, Resp>> rxRequest(ServiceMethod<Resp, Req> method) Likerequest(io.vertx.core.net.Address)with the default remote server.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
GrpcClient
-
GrpcClient
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
builder
Provide a builder forGrpcClient, it can be used to configure advanced client settings like a load balancer or an address resolver.Example usage:
GrpcClient client = GrpcClient.builder(vertx).with(options)...build()- Parameters:
vertx-- Returns:
-
client
Create a client.- Parameters:
vertx- the vertx instance- Returns:
- the created client
-
client
Create a client.- Parameters:
vertx- the vertx instanceoptions-- Returns:
- the created client
-
client
public static GrpcClient client(io.vertx.rxjava3.core.Vertx vertx, GrpcClientOptions grpcOptions, ClientSSLOptions sslOptions) Create a client with the specifiedsslOptions.- Parameters:
vertx- the vertx instancegrpcOptions- the http client optionssslOptions- the http client options- Returns:
- the created client
-
client
Create a client with the specifiedsslOptions.- Parameters:
vertx- the vertx instancesslOptions- the http client options- Returns:
- the created client
-
client
public static GrpcClient client(io.vertx.rxjava3.core.Vertx vertx, GrpcClientOptions grpcOptions, HttpClientOptions httpOptions) Create a client with the specifiedoptions.- Parameters:
vertx- the vertx instancegrpcOptions- the http client optionshttpOptions- the http client options- Returns:
- the created client
-
client
Create a client with the specifiedoptions.- Parameters:
vertx- the vertx instanceoptions- the http client options- Returns:
- the created client
-
client
Create a client wrapping an existing .- Parameters:
vertx- the vertx instanceclient- the http client instance- Returns:
- the created client
-
request
Connect to the remoteserverand create a request for any hosted gRPC service.- Parameters:
server- the server hosting the service- Returns:
- a future request
-
rxRequest
Connect to the remoteserverand create a request for any hosted gRPC service.- Parameters:
server- the server hosting the service- Returns:
- a future request
-
request
Likerequest(io.vertx.core.net.Address)with the default remote server.- Returns:
-
rxRequest
Likerequest(io.vertx.core.net.Address)with the default remote server.- Returns:
-
close
public io.reactivex.rxjava3.core.Completable close()Close this client.- Returns:
-
rxClose
public io.reactivex.rxjava3.core.Completable rxClose()Close this client.- Returns:
-
request
public <Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req,Resp>> request(Address server, ServiceMethod<Resp, Req> method) Connect to the remoteserverand create a request for any hosted gRPC service.- Parameters:
server- the server hosting the servicemethod- the grpc method- Returns:
- a future request
-
rxRequest
public <Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req,Resp>> rxRequest(Address server, ServiceMethod<Resp, Req> method) Connect to the remoteserverand create a request for any hosted gRPC service.- Parameters:
server- the server hosting the servicemethod- the grpc method- Returns:
- a future request
-
request
public <Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req,Resp>> request(ServiceMethod<Resp, Req> method) Likerequest(io.vertx.core.net.Address)with the default remote server.- Parameters:
method-- Returns:
-
rxRequest
public <Req,Resp> io.reactivex.rxjava3.core.Single<GrpcClientRequest<Req,Resp>> rxRequest(ServiceMethod<Resp, Req> method) Likerequest(io.vertx.core.net.Address)with the default remote server.- Parameters:
method-- Returns:
-
newInstance
-