use of io.quarkus.netty.deployment.EventLoopSupplierBuildItem in project quarkus by quarkusio.
the class VertxCoreProcessor method build.
@BuildStep
@Produce(ServiceStartBuildItem.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
CoreVertxBuildItem build(VertxCoreRecorder recorder, LaunchModeBuildItem launchMode, ShutdownContextBuildItem shutdown, VertxConfiguration config, List<VertxOptionsConsumerBuildItem> vertxOptionsConsumers, BuildProducer<SyntheticBeanBuildItem> syntheticBeans, BuildProducer<EventLoopSupplierBuildItem> eventLoops, ExecutorBuildItem executorBuildItem) {
Collections.sort(vertxOptionsConsumers);
List<Consumer<VertxOptions>> consumers = new ArrayList<>(vertxOptionsConsumers.size());
for (VertxOptionsConsumerBuildItem x : vertxOptionsConsumers) {
consumers.add(x.getConsumer());
}
Supplier<Vertx> vertx = recorder.configureVertx(config, launchMode.getLaunchMode(), shutdown, consumers, executorBuildItem.getExecutorProxy());
syntheticBeans.produce(SyntheticBeanBuildItem.configure(Vertx.class).types(Vertx.class).scope(Singleton.class).unremovable().setRuntimeInit().supplier(vertx).done());
// Event loops are only usable after the core vertx instance is configured
eventLoops.produce(new EventLoopSupplierBuildItem(recorder.mainSupplier(), recorder.bossSupplier()));
if (launchMode.getLaunchMode().isDevOrTest()) {
handleBlockingWarningsInDevOrTestMode();
}
return new CoreVertxBuildItem(vertx);
}
Aggregations