Package io.servicetalk.grpc.api
Interface GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp>
-
- Type Parameters:
Req
- Type of request.Resp
- Type of response.
- All Superinterfaces:
java.lang.AutoCloseable
,GracefulAutoCloseable
- 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.BlockingRequestStreamingRoute<Req,Resp> extends GracefulAutoCloseable
A blocking gRPC route with request streaming.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Resp
handle(GrpcServiceContext ctx, BlockingIterable<Req> request)
Handles the passedGrpcRoutes.BlockingRequestStreamingRoute
.static <Req,Resp>
GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp>wrap(GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> rawRoute, GracefulAutoCloseable closeable)
Convenience method to wrap a rawGrpcRoutes.BlockingRequestStreamingRoute
instance with a passed detached close implementation ofGracefulAutoCloseable
.-
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
-
-
-
Method Detail
-
handle
Resp handle(GrpcServiceContext ctx, BlockingIterable<Req> request) throws java.lang.Exception
Handles the passedGrpcRoutes.BlockingRequestStreamingRoute
.- Parameters:
ctx
-GrpcServiceContext
for this call.request
-BlockingIterable
ofGrpcRoutes.BlockingRequestStreamingRoute
to handle.- Returns:
- The response.
- Throws:
java.lang.Exception
- If an exception occurs during request processing.
-
close
default void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
wrap
static <Req,Resp> GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> wrap(GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> rawRoute, GracefulAutoCloseable closeable)
Convenience method to wrap a rawGrpcRoutes.BlockingRequestStreamingRoute
instance with a passed detached close implementation ofGracefulAutoCloseable
.- Type Parameters:
Req
- Type of request.Resp
- Type of response.- Parameters:
rawRoute
-GrpcRoutes.BlockingRequestStreamingRoute
instance that has a detached close implementation.closeable
-GracefulAutoCloseable
implementation for the passedrawRoute
.- Returns:
- A new
GrpcRoutes.BlockingRequestStreamingRoute
that attaches the passedcloseable
to the passedrawRoute
.
-
-