Search in sources :

Example 1 with CamelRuntimeBeanBuildItem

use of org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem in project camel-quarkus by apache.

the class SupportMongoDBProcessor method registerCamelMongoClientProducers.

@BuildStep
void registerCamelMongoClientProducers(List<MongoClientBuildItem> mongoClients, BuildProducer<CamelRuntimeBeanBuildItem> runtimeBeans) {
    for (MongoClientBuildItem mongoClient : mongoClients) {
        String clientName = getMongoClientName(mongoClient.getName());
        runtimeBeans.produce(new CamelRuntimeBeanBuildItem(clientName, "com.mongodb.client.MongoClient", mongoClient.getClient()));
    }
}
Also used : MongoClientBuildItem(io.quarkus.mongodb.deployment.MongoClientBuildItem) CamelRuntimeBeanBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Aggregations

BuildStep (io.quarkus.deployment.annotations.BuildStep)1 MongoClientBuildItem (io.quarkus.mongodb.deployment.MongoClientBuildItem)1 CamelRuntimeBeanBuildItem (org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem)1