Class BlockingServerInterceptor

  • All Implemented Interfaces:
    io.grpc.ServerInterceptor, Function<String,​Boolean>

    public class BlockingServerInterceptor
    extends Object
    implements io.grpc.ServerInterceptor, Function<String,​Boolean>
    gRPC Server interceptor offloading the execution of the gRPC method on a worker thread if the method is annotated with Blocking.

    For non-annotated methods, the interceptor acts as a pass-through.

    • Constructor Detail

      • BlockingServerInterceptor

        public BlockingServerInterceptor​(io.vertx.core.Vertx vertx,
                                         List<String> blockingMethods,
                                         List<String> virtualMethods,
                                         Executor virtualThreadExecutor,
                                         boolean devMode)
    • Method Detail

      • interceptCall

        public <ReqT,​RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall​(io.grpc.ServerCall<ReqT,​RespT> call,
                                                                                  io.grpc.Metadata headers,
                                                                                  io.grpc.ServerCallHandler<ReqT,​RespT> next)
        Specified by:
        interceptCall in interface io.grpc.ServerInterceptor
      • getRequestContext

        protected io.quarkus.arc.ManagedContext getRequestContext()