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