Package io.servicetalk.grpc.api
Interface GrpcRoutes.RequestStreamingRoute<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.RequestStreamingRoute<Req,Resp>
extends AsyncCloseable
An asynchronous gRPC route with request streaming.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Completable
Used to close/shutdown a resource.handle
(GrpcServiceContext ctx, Publisher<Req> request) Handles the passedGrpcRoutes.RequestStreamingRoute
.static <Req,
Resp> GrpcRoutes.RequestStreamingRoute<Req, Resp> wrap
(GrpcRoutes.RequestStreamingRoute<Req, Resp> rawRoute, AsyncCloseable closeable) Convenience method to wrap a rawGrpcRoutes.RequestStreamingRoute
instance with a passed detached close implementation ofAsyncCloseable
.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsyncGracefully
-
Method Details
-
handle
Handles the passedGrpcRoutes.RequestStreamingRoute
.- Parameters:
ctx
-GrpcServiceContext
for this call.request
-Publisher
ofGrpcRoutes.RequestStreamingRoute
to handle.- Returns:
Single
containing the response.
-
closeAsync
Description copied from interface:AsyncCloseable
Used to close/shutdown a resource.- Specified by:
closeAsync
in interfaceAsyncCloseable
- Returns:
- A
Completable
that is notified once the close is complete.
-
wrap
static <Req,Resp> GrpcRoutes.RequestStreamingRoute<Req,Resp> wrap(GrpcRoutes.RequestStreamingRoute<Req, Resp> rawRoute, AsyncCloseable closeable) Convenience method to wrap a rawGrpcRoutes.RequestStreamingRoute
instance with a passed detached close implementation ofAsyncCloseable
.- Type Parameters:
Req
- Type of request.Resp
- Type of response.- Parameters:
rawRoute
-GrpcRoutes.RequestStreamingRoute
instance that has a detached close implementation.closeable
-AsyncCloseable
implementation for the passedrawRoute
.- Returns:
- A new
GrpcRoutes.RequestStreamingRoute
that attaches the passedcloseable
to the passedrawRoute
.
-