Search in sources :

Example 16 with RuntimeValue

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);
}
Also used : VertxHttpComponent(org.apache.camel.component.vertx.http.VertxHttpComponent) RuntimeValue(io.quarkus.runtime.RuntimeValue)

Example 17 with RuntimeValue

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);
}
Also used : QuteComponent(org.apache.camel.component.qute.QuteComponent) RuntimeValue(io.quarkus.runtime.RuntimeValue) Engine(io.quarkus.qute.Engine)

Example 18 with RuntimeValue

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);
}
Also used : Configuration(org.apache.ibatis.session.Configuration) SqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory) RuntimeValue(io.quarkus.runtime.RuntimeValue) SqlSessionFactoryBuilder(org.apache.ibatis.session.SqlSessionFactoryBuilder) SQLFeatureNotSupportedException(java.sql.SQLFeatureNotSupportedException) URISyntaxException(java.net.URISyntaxException) SQLException(java.sql.SQLException)

Example 19 with RuntimeValue

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);
}
Also used : ComponentCustomizer(org.apache.camel.spi.ComponentCustomizer) KnativeComponent(org.apache.camel.component.knative.KnativeComponent) RuntimeValue(io.quarkus.runtime.RuntimeValue) Component(org.apache.camel.Component) KnativeComponent(org.apache.camel.component.knative.KnativeComponent) KnativeHttpProducerFactory(org.apache.camel.component.knative.http.KnativeHttpProducerFactory)

Example 20 with RuntimeValue

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);
}
Also used : ComponentCustomizer(org.apache.camel.spi.ComponentCustomizer) KnativeComponent(org.apache.camel.component.knative.KnativeComponent) RuntimeValue(io.quarkus.runtime.RuntimeValue) KnativeHttpConsumerFactory(org.apache.camel.component.knative.http.KnativeHttpConsumerFactory) Component(org.apache.camel.Component) KnativeComponent(org.apache.camel.component.knative.KnativeComponent)

Aggregations

RuntimeValue (io.quarkus.runtime.RuntimeValue)31 FhirContext (ca.uhn.fhir.context.FhirContext)4 BuildStep (io.quarkus.deployment.annotations.BuildStep)2 Record (io.quarkus.deployment.annotations.Record)2 CamelContext (org.apache.camel.CamelContext)2 Component (org.apache.camel.Component)2 KnativeComponent (org.apache.camel.component.knative.KnativeComponent)2 CamelProducers (org.apache.camel.quarkus.core.CamelProducers)2 ComponentCustomizer (org.apache.camel.spi.ComponentCustomizer)2 Logger (ch.qos.logback.classic.Logger)1 AWSLogs (com.amazonaws.services.logs.AWSLogs)1 AWSLogsClientBuilder (com.amazonaws.services.logs.AWSLogsClientBuilder)1 Configuration (freemarker.template.Configuration)1 Tracer (io.opentracing.Tracer)1 CloudWatchCredentialsProvider (io.quarkiverse.logging.cloudwatch.auth.CloudWatchCredentialsProvider)1 AdditionalBeanBuildItem (io.quarkus.arc.deployment.AdditionalBeanBuildItem)1 BeanRegistrationPhaseBuildItem (io.quarkus.arc.deployment.BeanRegistrationPhaseBuildItem)1 UnremovableBeanBuildItem (io.quarkus.arc.deployment.UnremovableBeanBuildItem)1 BuildExtension (io.quarkus.arc.processor.BuildExtension)1 ApplicationArchive (io.quarkus.deployment.ApplicationArchive)1