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