Interface GrpcServerRequest<Req,Resp>
- All Superinterfaces:
GrpcReadStream<Req>, ReadStream<Req>, StreamBase
-
Method Summary
Modifier and TypeMethodDescriptiondeadline()endHandler(Handler<Void> endHandler) Set an end handler.errorHandler(Handler<GrpcError> handler) Set a handler to be notified with gRPC errors.exceptionHandler(Handler<Throwable> handler) Set an exception handler on the read stream.fetch(long amount) Fetch the specifiedamountof elements.Set a data handler.messageHandler(Handler<GrpcMessage> handler) Set a handler to be notified with incoming encoded messages.pause()Pause theReadStream, it sets the buffer infetchmode and clears the actual demand.response()resume()Resume reading, and sets the buffer inflowingmode.longtimeout()Methods inherited from interface GrpcReadStream
encoding, end, format, headers, invalidMessageHandler, lastMethods inherited from interface ReadStream
blockingStream, collect, pipe, pipeTo
-
Method Details
-
serviceName
ServiceName serviceName()- Returns:
- the service name
-
methodName
String methodName()- Returns:
- the method name
-
fullMethodName
String fullMethodName()- Returns:
- the full method name sent by the client
-
response
GrpcServerResponse<Req,Resp> response()- Returns:
- the response
-
messageHandler
Description copied from interface:GrpcReadStreamSet a handler to be notified with incoming encoded messages. Thehandleris responsible for fully decoding incoming messages, including compression.- Specified by:
messageHandlerin interfaceGrpcReadStream<Req>- Parameters:
handler- the message handler- Returns:
- a reference to this, so the API can be used fluently
-
errorHandler
Description copied from interface:GrpcReadStreamSet a handler to be notified with gRPC errors.- Specified by:
errorHandlerin interfaceGrpcReadStream<Req>- Parameters:
handler- the error handler- Returns:
- a reference to this, so the API can be used fluently
-
exceptionHandler
Description copied from interface:ReadStreamSet an exception handler on the read stream.- Specified by:
exceptionHandlerin interfaceGrpcReadStream<Req>- Specified by:
exceptionHandlerin interfaceReadStream<Req>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler- the exception handler- Returns:
- a reference to this, so the API can be used fluently
-
handler
Description copied from interface:ReadStreamSet a data handler. As data is read, the handler will be called with the data.- Specified by:
handlerin interfaceGrpcReadStream<Req>- Specified by:
handlerin interfaceReadStream<Req>- Returns:
- a reference to this, so the API can be used fluently
-
pause
GrpcServerRequest<Req,Resp> pause()Description copied from interface:ReadStreamPause theReadStream, it sets the buffer infetchmode and clears the actual demand.While it's paused, no data will be sent to the data
handler.- Specified by:
pausein interfaceGrpcReadStream<Req>- Specified by:
pausein interfaceReadStream<Req>- Returns:
- a reference to this, so the API can be used fluently
-
resume
GrpcServerRequest<Req,Resp> resume()Description copied from interface:ReadStreamResume reading, and sets the buffer inflowingmode. If theReadStreamhas been paused, reading will recommence on it.- Specified by:
resumein interfaceGrpcReadStream<Req>- Specified by:
resumein interfaceReadStream<Req>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
Description copied from interface:ReadStreamFetch the specifiedamountof elements. If theReadStreamhas been paused, reading will recommence with the specifiedamountof items, otherwise the specifiedamountwill be added to the current stream demand.- Specified by:
fetchin interfaceGrpcReadStream<Req>- Specified by:
fetchin interfaceReadStream<Req>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
Description copied from interface:ReadStreamSet an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.- Specified by:
endHandlerin interfaceGrpcReadStream<Req>- Specified by:
endHandlerin interfaceReadStream<Req>- Returns:
- a reference to this, so the API can be used fluently
-
connection
HttpConnection connection()- Returns:
- the underlying HTTP connection
-
timeout
long timeout()- Returns:
- the request timeout sent by the client or
0Lif none.
-
deadline
Timer deadline()- Returns:
- the request deadline or
nullwhen no deadline has been scheduled
-