Req
- Type of request.Resp
- Type of response.@FunctionalInterface protected static interface GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> extends GracefulAutoCloseable
Modifier and Type | Method and Description |
---|---|
default void |
close() |
Resp |
handle(GrpcServiceContext ctx,
BlockingIterable<Req> request)
Handles the passed
Req . |
static <Req,Resp> GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> |
wrap(GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> rawRoute,
GracefulAutoCloseable closeable)
Convenience method to wrap a raw
GrpcRoutes.BlockingRequestStreamingRoute instance with a passed detached close
implementation of GracefulAutoCloseable . |
closeGracefully
Resp handle(GrpcServiceContext ctx, BlockingIterable<Req> request) throws java.lang.Exception
Req
.ctx
- GrpcServiceContext
for this call.request
- BlockingIterable
of Req
to handle.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.BlockingRequestStreamingRoute<Req,Resp> wrap(GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> rawRoute, GracefulAutoCloseable closeable)
GrpcRoutes.BlockingRequestStreamingRoute
instance with a passed detached close
implementation of GracefulAutoCloseable
.Req
- Type of request.Resp
- Type of response.rawRoute
- GrpcRoutes.BlockingRequestStreamingRoute
instance that has a detached close implementation.closeable
- GracefulAutoCloseable
implementation for the passed rawRoute
.GrpcRoutes.BlockingRequestStreamingRoute
that attaches the passed closeable
to the passed
rawRoute
.