Req
- Type of request.Resp
- Type of response.@FunctionalInterface protected static interface GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> extends GracefulAutoCloseable
Modifier and Type | Method and Description |
---|---|
default void |
close() |
void |
handle(GrpcServiceContext ctx,
Req request,
GrpcPayloadWriter<Resp> responseWriter)
Handles the passed
Req . |
static <Req,Resp> GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> |
wrap(GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> rawRoute,
GracefulAutoCloseable closeable)
Convenience method to wrap a raw
GrpcRoutes.BlockingResponseStreamingRoute instance with a passed detached close
implementation of GracefulAutoCloseable . |
closeGracefully
void handle(GrpcServiceContext ctx, Req request, GrpcPayloadWriter<Resp> responseWriter) throws java.lang.Exception
Req
.ctx
- GrpcServiceContext
for this call.request
- Req
to handle.responseWriter
- GrpcPayloadWriter
to write the response.java.lang.Exception
- If an exception occurs during request processing.default void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
static <Req,Resp> GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> wrap(GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> rawRoute, GracefulAutoCloseable closeable)
GrpcRoutes.BlockingResponseStreamingRoute
instance with a passed detached close
implementation of GracefulAutoCloseable
.Req
- Type of request.Resp
- Type of response.rawRoute
- GrpcRoutes.BlockingResponseStreamingRoute
instance that has a detached close implementation.closeable
- GracefulAutoCloseable
implementation for the passed rawRoute
.GrpcRoutes.BlockingResponseStreamingRoute
that attaches the passed closeable
to the passed
rawRoute
.