use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class CamelVertxHttpRecorder method createVertxHttpComponent.
public RuntimeValue<?> createVertxHttpComponent(RuntimeValue<Vertx> vertx) {
VertxHttpComponent component = new VertxHttpComponent();
component.setVertx(vertx.getValue());
return new RuntimeValue<>(component);
}
use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class CamelQuteRecorder method createQuteComponent.
public RuntimeValue<QuteComponent> createQuteComponent(BeanContainer beanContainer) {
Engine quteEngine = beanContainer.instance(Engine.class);
QuteComponent component = new QuteComponent();
component.setQuteEngine(quteEngine);
return new RuntimeValue<>(component);
}
use of io.quarkus.runtime.RuntimeValue in project quarkus-mybatis by quarkiverse.
the class QuarkusDataSource method createSqlSessionFactory.
public RuntimeValue<SqlSessionFactory> createSqlSessionFactory(MyBatisRuntimeConfig config, XMLConfigDelegateBuilder builder) {
Configuration configuration;
try {
builder.setConfig(config);
builder.getConfiguration().getTypeAliasRegistry().registerAlias("QUARKUS", QuarkusDataSourceFactory.class);
configuration = builder.parse();
} catch (Exception e) {
throw new RuntimeException(e);
}
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration);
return new RuntimeValue<>(sqlSessionFactory);
}
use of io.quarkus.runtime.RuntimeValue in project camel-k-runtime by apache.
the class KnativeProducerRecorder method createKnativeProducerFactoryCustomizer.
public RuntimeValue<ComponentCustomizer> createKnativeProducerFactoryCustomizer(Supplier<Vertx> vertx) {
KnativeHttpProducerFactory factory = new KnativeHttpProducerFactory();
factory.setVertx(vertx.get());
ComponentCustomizer cf = new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
if (target instanceof KnativeComponent) {
((KnativeComponent) target).setProducerFactory(factory);
}
}
};
return new RuntimeValue<>(cf);
}
use of io.quarkus.runtime.RuntimeValue in project camel-k-runtime by apache.
the class KnativeConsumerRecorder method createKnativeConsumerFactoryCustomizer.
public RuntimeValue<ComponentCustomizer> createKnativeConsumerFactoryCustomizer(RuntimeValue<Router> router) {
KnativeHttpConsumerFactory factory = new KnativeHttpConsumerFactory();
factory.setRouter(router.getValue());
ComponentCustomizer cf = new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
if (target instanceof KnativeComponent) {
((KnativeComponent) target).setConsumerFactory(factory);
}
}
};
return new RuntimeValue<>(cf);
}
Aggregations