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. |
Resp handle(GrpcServiceContext ctx, BlockingIterable<Req> request) throws Exception
Req.ctx - GrpcServiceContext for this call.request - BlockingIterable of Req to handle.Exception - If an exception occurs during request processing.default void close()
throws Exception
close in interface AutoCloseableExceptionstatic <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.