Package io.servicetalk.grpc.api
Interface GrpcRoutes.ResponseStreamingRoute<Req,Resp>
- Type Parameters:
Req- Type of request.Resp- Type of response.
- All Superinterfaces:
AsyncCloseable
- Enclosing class:
- GrpcRoutes<Service extends GrpcService>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
protected static interface GrpcRoutes.ResponseStreamingRoute<Req,Resp>
extends AsyncCloseable
An asynchronous gRPC route with response streaming.
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompletableUsed to close/shutdown a resource.handle(GrpcServiceContext ctx, Req request) Handles the passedGrpcRoutes.ResponseStreamingRoute.static <Req,Resp> GrpcRoutes.ResponseStreamingRoute<Req, Resp> wrap(GrpcRoutes.ResponseStreamingRoute<Req, Resp> rawRoute, AsyncCloseable closeable) Convenience method to wrap a rawGrpcRoutes.ResponseStreamingRouteinstance with a passed detached close implementation ofAsyncCloseable.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsyncGracefully
-
Method Details
-
handle
Handles the passedGrpcRoutes.ResponseStreamingRoute.- Parameters:
ctx-GrpcServiceContextfor this call.request-GrpcRoutes.ResponseStreamingRouteto handle.- Returns:
Publishercontaining the response.
-
closeAsync
Description copied from interface:AsyncCloseableUsed to close/shutdown a resource.- Specified by:
closeAsyncin interfaceAsyncCloseable- Returns:
- A
Completablethat is notified once the close is complete.
-
wrap
static <Req,Resp> GrpcRoutes.ResponseStreamingRoute<Req,Resp> wrap(GrpcRoutes.ResponseStreamingRoute<Req, Resp> rawRoute, AsyncCloseable closeable) Convenience method to wrap a rawGrpcRoutes.ResponseStreamingRouteinstance with a passed detached close implementation ofAsyncCloseable.- Type Parameters:
Req- Type of request.Resp- Type of response.- Parameters:
rawRoute-GrpcRoutes.ResponseStreamingRouteinstance that has a detached close implementation.closeable-AsyncCloseableimplementation for the passedrawRoute.- Returns:
- A new
GrpcRoutes.ResponseStreamingRoutethat attaches the passedcloseableto the passedrawRoute.
-