io.quarkus.grpc.runtime.supports.blocking.BlockingExecutionHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-grpc Show documentation
Show all versions of quarkus-grpc Show documentation
Serve and consume gRPC services
package io.quarkus.grpc.runtime.supports.blocking;
import java.util.function.Consumer;
import io.grpc.Context;
import io.grpc.ServerCall;
import io.quarkus.arc.InjectableContext;
import io.quarkus.arc.ManagedContext;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
class BlockingExecutionHandler implements Handler> {
private final ServerCall.Listener delegate;
private final Context grpcContext;
private final Consumer> consumer;
private final InjectableContext.ContextState state;
private final ManagedContext requestContext;
private final Object lock;
public BlockingExecutionHandler(Consumer> consumer, Context grpcContext,
ServerCall.Listener delegate, InjectableContext.ContextState state,
ManagedContext requestContext,
Object lock) {
this.consumer = consumer;
this.grpcContext = grpcContext;
this.delegate = delegate;
this.state = state;
this.requestContext = requestContext;
this.lock = lock;
}
@Override
public void handle(Promise