public interface GrpcClientRequest<Req,Resp> extends GrpcWriteStream<Req>
You interact with the remote service with gRPC generated messages or protobuf encoded messages.
Before sending a request you need to set #serviceName) and #methodName) or
alternatively the service fullMethodName(java.lang.String).
Writing a request message will send the request to the service:
#end(Req)#write(Req) any time you need and then WriteStream.end()| Modifier and Type | Method and Description |
|---|---|
io.vertx.core.http.HttpConnection |
connection() |
GrpcClientRequest<Req,Resp> |
drainHandler(Handler<Void> handler) |
GrpcClientRequest<Req,Resp> |
encoding(String encoding) |
GrpcClientRequest<Req,Resp> |
exceptionHandler(Handler<Throwable> handler) |
GrpcClientRequest<Req,Resp> |
fullMethodName(String fullMethodName)
Set the full method name to call, it must follow the format
package-name + '.' + service-name + '/' + method-name
or an IllegalArgumentException is thrown. |
GrpcClientRequest<Req,Resp> |
idleTimeout(long timeout)
Sets the amount of time after which, if the request does not return any data within the timeout period,
the request/response is cancelled and the related futures.
|
GrpcClientRequest<Req,Resp> |
methodName(String methodName)
Set the method name to call.
|
Future<GrpcClientResponse<Req,Resp>> |
response() |
default Future<GrpcClientResponse<Req,Resp>> |
send(ReadStream<Req> body) |
default Future<GrpcClientResponse<Req,Resp>> |
send(Req item) |
GrpcClientRequest<Req,Resp> |
serviceName(ServiceName serviceName)
Set the service name to call.
|
GrpcClientRequest<Req,Resp> |
setWriteQueueMaxSize(int maxSize) |
cancel, endMessage, headers, writeMessageend, end, end, end, write, write, writeQueueFullGrpcClientRequest<Req,Resp> encoding(String encoding)
encoding in interface GrpcWriteStream<Req>GrpcClientRequest<Req,Resp> fullMethodName(String fullMethodName)
package-name + '.' + service-name + '/' + method-name
or an IllegalArgumentException is thrown.
It must be called before sending the request otherwise an IllegalStateException is thrown.
fullMethodName - the full method name to callGrpcClientRequest<Req,Resp> serviceName(ServiceName serviceName)
It must be called before sending the request otherwise an IllegalStateException is thrown.
serviceName - the service name to callGrpcClientRequest<Req,Resp> methodName(String methodName)
It must be called before sending the request otherwise an IllegalStateException is thrown.
methodName - the method name to callFuture<GrpcClientResponse<Req,Resp>> response()
GrpcClientRequest<Req,Resp> exceptionHandler(Handler<Throwable> handler)
exceptionHandler in interface GrpcWriteStream<Req>exceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<Req>GrpcClientRequest<Req,Resp> setWriteQueueMaxSize(int maxSize)
setWriteQueueMaxSize in interface GrpcWriteStream<Req>setWriteQueueMaxSize in interface WriteStream<Req>GrpcClientRequest<Req,Resp> drainHandler(Handler<Void> handler)
drainHandler in interface GrpcWriteStream<Req>drainHandler in interface WriteStream<Req>GrpcClientRequest<Req,Resp> idleTimeout(long timeout)
timeout - the amount of time in milliseconds.io.vertx.core.http.HttpConnection connection()
default Future<GrpcClientResponse<Req,Resp>> send(Req item)
default Future<GrpcClientResponse<Req,Resp>> send(ReadStream<Req> body)
Copyright © 2025 Eclipse. All rights reserved.