public interface GrpcClientResponse<Req,Resp> extends GrpcReadStream<Resp>
messageHandler(Handler)
to receive GrpcMessage
and a endHandler(Handler)
to be notified
of the end of the response.Modifier and Type | Method and Description |
---|---|
GrpcClientResponse<Req,Resp> |
endHandler(Handler<Void> handler)
Set an end handler.
|
GrpcClientResponse<Req,Resp> |
errorHandler(Handler<GrpcError> handler)
Set a handler to be notified with gRPC errors.
|
GrpcClientResponse<Req,Resp> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
GrpcClientResponse<Req,Resp> |
fetch(long amount)
Fetch the specified
amount of elements. |
GrpcClientResponse<Req,Resp> |
handler(Handler<Resp> handler)
Set a data handler.
|
GrpcClientResponse<Req,Resp> |
messageHandler(Handler<GrpcMessage> handler)
Set a handler to be notified with incoming encoded messages.
|
GrpcClientResponse<Req,Resp> |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
GrpcClientResponse<Req,Resp> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
GrpcStatus |
status() |
String |
statusMessage() |
MultiMap |
trailers() |
collecting, encoding, end, headers, invalidMessageHandler, last
collect, pipe, pipeTo, pipeTo
GrpcStatus status()
null
when the status has not yet been receivedString statusMessage()
null
when the status has not yet been received or not transmittedGrpcClientResponse<Req,Resp> messageHandler(Handler<GrpcMessage> handler)
GrpcReadStream
handler
is
responsible for fully decoding incoming messages, including compression.messageHandler
in interface GrpcReadStream<Resp>
handler
- the message handlerGrpcClientResponse<Req,Resp> errorHandler(Handler<GrpcError> handler)
GrpcReadStream
errorHandler
in interface GrpcReadStream<Resp>
handler
- the error handlerGrpcClientResponse<Req,Resp> exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface GrpcReadStream<Resp>
exceptionHandler
in interface ReadStream<Resp>
exceptionHandler
in interface StreamBase
handler
- the exception handlerGrpcClientResponse<Req,Resp> handler(Handler<Resp> handler)
ReadStream
handler
in interface GrpcReadStream<Resp>
handler
in interface ReadStream<Resp>
GrpcClientResponse<Req,Resp> endHandler(Handler<Void> handler)
ReadStream
endHandler
in interface GrpcReadStream<Resp>
endHandler
in interface ReadStream<Resp>
GrpcClientResponse<Req,Resp> pause()
ReadStream
ReadStream
, it sets the buffer in fetch
mode and clears the actual demand.
While it's paused, no data will be sent to the data handler
.
pause
in interface GrpcReadStream<Resp>
pause
in interface ReadStream<Resp>
GrpcClientResponse<Req,Resp> resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface GrpcReadStream<Resp>
resume
in interface ReadStream<Resp>
GrpcClientResponse<Req,Resp> fetch(long amount)
ReadStream
amount
of elements. If the ReadStream
has been paused, reading will
recommence with the specified amount
of items, otherwise the specified amount
will
be added to the current stream demand.fetch
in interface GrpcReadStream<Resp>
fetch
in interface ReadStream<Resp>
Copyright © 2024 Eclipse. All rights reserved.