Req
- Type of request.Resp
- Type of response.@FunctionalInterface protected static interface GrpcRoutes.Route<Req,Resp> extends AsyncCloseable
Modifier and Type | Method and Description |
---|---|
default Completable |
closeAsync()
Used to close/shutdown a resource.
|
Single<Resp> |
handle(GrpcServiceContext ctx,
Req request)
Handles the passed
Req . |
static <Req,Resp> GrpcRoutes.Route<Req,Resp> |
wrap(GrpcRoutes.Route<Req,Resp> rawRoute,
AsyncCloseable closeable)
Convenience method to wrap a raw
GrpcRoutes.Route instance with a passed detached close implementation
of AsyncCloseable . |
closeAsyncGracefully
Single<Resp> handle(GrpcServiceContext ctx, Req request)
Req
.ctx
- GrpcServiceContext
for this call.request
- Req
to handle.Single
containing the response.default Completable closeAsync()
AsyncCloseable
closeAsync
in interface AsyncCloseable
CompletableSource
that is notified once the close is complete.static <Req,Resp> GrpcRoutes.Route<Req,Resp> wrap(GrpcRoutes.Route<Req,Resp> rawRoute, AsyncCloseable closeable)
GrpcRoutes.Route
instance with a passed detached close implementation
of AsyncCloseable
.Req
- Type of request.Resp
- Type of response.rawRoute
- GrpcRoutes.Route
instance that has a detached close implementation.closeable
- AsyncCloseable
implementation for the passed rawRoute
.GrpcRoutes.Route
that attaches the passed closeable
to the passed rawRoute
.