io.quarkus.arc.deployment.BeanContainerBuildItem Java Examples

The following examples show how to use io.quarkus.arc.deployment.BeanContainerBuildItem. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SmallRyeGraphQLProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
void buildExecutionService(
        BuildProducer<ReflectiveClassBuildItem> reflectiveClassProducer,
        BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchyProducer,
        SmallRyeGraphQLRecorder recorder,
        BeanContainerBuildItem beanContainer,
        CombinedIndexBuildItem combinedIndex) {

    IndexView index = combinedIndex.getIndex();
    Schema schema = SchemaBuilder.build(index);

    recorder.createExecutionService(beanContainer.getValue(), schema);

    // Make sure the complex object from the application can work in native mode
    for (String c : getClassesToRegisterForReflection(schema)) {
        DotName name = DotName.createSimple(c);
        org.jboss.jandex.Type type = org.jboss.jandex.Type.create(name, org.jboss.jandex.Type.Kind.CLASS);
        reflectiveHierarchyProducer.produce(new ReflectiveHierarchyBuildItem(type, index));
    }

    // Make sure the GraphQL Java classes needed for introspection can work in native mode
    reflectiveClassProducer.produce(new ReflectiveClassBuildItem(true, true, getGraphQLJavaClasses()));
}
 
Example #2
Source File: FunqyKnativeEventsBuildStep.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@BuildStep
@Record(RUNTIME_INIT)
public void boot(ShutdownContextBuildItem shutdown,
        FunqyConfig funqyConfig,
        FunqyKnativeEventsConfig eventsConfig,
        KnativeEventsBindingRecorder binding,
        Optional<FunctionInitializedBuildItem> hasFunctions,
        BuildProducer<FeatureBuildItem> feature,
        BuildProducer<DefaultRouteBuildItem> defaultRoutes,
        CoreVertxBuildItem vertx,
        BeanContainerBuildItem beanContainer,
        ExecutorBuildItem executorBuildItem) throws Exception {
    if (!hasFunctions.isPresent() || hasFunctions.get() == null)
        return;

    feature.produce(new FeatureBuildItem(FUNQY_KNATIVE_FEATURE));
    Consumer<Route> ut = binding.start(funqyConfig, eventsConfig, vertx.getVertx(),
            shutdown,
            beanContainer.getValue(),
            executorBuildItem.getExecutorProxy());

    defaultRoutes.produce(new DefaultRouteBuildItem(ut));
}
 
Example #3
Source File: CacheProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@BuildStep
@Record(RUNTIME_INIT)
void recordCachesBuild(CombinedIndexBuildItem combinedIndex, BeanContainerBuildItem beanContainer, CacheConfig config,
        CaffeineCacheBuildRecorder caffeineRecorder,
        List<AdditionalCacheNameBuildItem> additionalCacheNames,
        Optional<ManagedExecutorInitializedBuildItem> managedExecutorInitialized) {
    Set<String> cacheNames = getCacheNames(combinedIndex.getIndex());
    for (AdditionalCacheNameBuildItem additionalCacheName : additionalCacheNames) {
        cacheNames.add(additionalCacheName.getName());
    }
    switch (config.type) {
        case CacheDeploymentConstants.CAFFEINE_CACHE_TYPE:
            Set<CaffeineCacheInfo> cacheInfos = CaffeineCacheInfoBuilder.build(cacheNames, config);
            caffeineRecorder.buildCaches(managedExecutorInitialized.isPresent(), beanContainer.getValue(), cacheInfos);
            break;
        default:
            throw new DeploymentException("Unknown cache type: " + config.type);
    }
}
 
Example #4
Source File: AvroProcessor.java    From camel-quarkus with Apache License 2.0 6 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
void recordAvroSchemasResigtration(BeanArchiveIndexBuildItem beanArchiveIndex,
        BeanContainerBuildItem beanContainer, AvroRecorder avroRecorder) {
    IndexView index = beanArchiveIndex.getIndex();
    for (AnnotationInstance annotation : index.getAnnotations(BUILD_TIME_AVRO_DATAFORMAT_ANNOTATION)) {
        String schemaResourceName = annotation.value().asString();
        FieldInfo fieldInfo = annotation.target().asField();
        String injectedFieldId = fieldInfo.declaringClass().name() + "." + fieldInfo.name();
        try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(schemaResourceName)) {
            Schema avroSchema = new Schema.Parser().parse(is);
            avroRecorder.recordAvroSchemaResigtration(beanContainer.getValue(), injectedFieldId, avroSchema);
            LOG.debug("Parsed the avro schema at build time from resource named " + schemaResourceName);
        } catch (SchemaParseException | IOException ex) {
            final String message = "An issue occured while parsing schema resource on field " + injectedFieldId;
            throw new RuntimeException(message, ex);
        }
    }
}
 
Example #5
Source File: ArtemisCoreProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep
ArtemisCoreConfiguredBuildItem configure(ArtemisCoreRecorder recorder, ArtemisRuntimeConfig runtimeConfig,
        BeanContainerBuildItem beanContainer, Optional<ArtemisJmsBuildItem> artemisJms) {

    if (artemisJms.isPresent()) {
        return null;
    }
    recorder.setConfig(runtimeConfig, beanContainer.getValue());
    return new ArtemisCoreConfiguredBuildItem();
}
 
Example #6
Source File: KeycloakPolicyEnforcerBuildStep.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep
public void setup(OidcBuildTimeConfig oidcBuildTimeConfig, OidcConfig oidcRunTimeConfig,
        KeycloakPolicyEnforcerConfig keycloakConfig, KeycloakPolicyEnforcerRecorder recorder, BeanContainerBuildItem bc,
        HttpConfiguration httpConfiguration) {
    if (oidcBuildTimeConfig.enabled && keycloakConfig.policyEnforcer.enable) {
        recorder.setup(oidcRunTimeConfig, keycloakConfig, bc.getValue(), httpConfiguration);
    }
}
 
Example #7
Source File: SmallRyeGraphQLProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
void buildEndpoints(
        BuildProducer<RouteBuildItem> routeProducer,
        BuildProducer<NotFoundPageDisplayableEndpointBuildItem> notFoundPageDisplayableEndpointProducer,
        LaunchModeBuildItem launchMode,
        SmallRyeGraphQLRecorder recorder,
        ShutdownContextBuildItem shutdownContext,
        BeanContainerBuildItem beanContainerBuildItem // don't remove this - makes sure beanContainer is initialized
) {

    /*
     * <em>Ugly Hack</em>
     * In dev mode, we pass a classloader to use in the CDI Loader.
     * This hack is required because using the TCCL would get an outdated version - the initial one.
     * This is because the worker thread on which the handler is called captures the TCCL at creation time
     * and does not allow updating it.
     *
     * In non dev mode, the TCCL is used.
     */
    if (launchMode.getLaunchMode() == LaunchMode.DEVELOPMENT) {
        recorder.setupClDevMode(shutdownContext);
    }
    // add graphql endpoint for not found display in dev or test mode
    if (launchMode.getLaunchMode().isDevOrTest()) {
        notFoundPageDisplayableEndpointProducer
                .produce(new NotFoundPageDisplayableEndpointBuildItem(quarkusConfig.rootPath));
        notFoundPageDisplayableEndpointProducer
                .produce(new NotFoundPageDisplayableEndpointBuildItem(quarkusConfig.rootPath + SCHEMA_PATH));
    }

    Boolean allowGet = ConfigProvider.getConfig().getOptionalValue(ConfigKey.ALLOW_GET, boolean.class).orElse(false);

    Handler<RoutingContext> executionHandler = recorder.executionHandler(allowGet);
    routeProducer.produce(new RouteBuildItem(quarkusConfig.rootPath, executionHandler, HandlerType.BLOCKING));

    Handler<RoutingContext> schemaHandler = recorder.schemaHandler();
    routeProducer.produce(
            new RouteBuildItem(quarkusConfig.rootPath + SCHEMA_PATH, schemaHandler, HandlerType.BLOCKING));
}
 
Example #8
Source File: SmallRyeMetricsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(STATIC_INIT)
public void build(BeanContainerBuildItem beanContainerBuildItem,
        SmallRyeMetricsRecorder metrics,
        BuildProducer<ReflectiveClassBuildItem> reflectiveClasses) {
    for (DotName metricsAnnotation : METRICS_ANNOTATIONS) {
        reflectiveClasses.produce(new ReflectiveClassBuildItem(false, false, metricsAnnotation.toString()));
    }

    reflectiveClasses.produce(new ReflectiveClassBuildItem(false, false, METRICS_BINDING.toString()));
    metrics.createRegistries(beanContainerBuildItem.getValue());
}
 
Example #9
Source File: TikaProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.STATIC_INIT)
void initializeTikaParser(BeanContainerBuildItem beanContainer, TikaRecorder recorder,
        BuildProducer<ServiceProviderBuildItem> serviceProvider, TikaConfiguration configuration)
        throws Exception {
    Map<String, List<TikaParserParameter>> parsers = getSupportedParserConfig(configuration.tikaConfigPath,
            configuration.parsers,
            configuration.parserOptions, configuration.parser);
    String tikaXmlConfiguration = generateTikaXmlConfiguration(parsers);

    serviceProvider.produce(new ServiceProviderBuildItem(Parser.class.getName(), new ArrayList<>(parsers.keySet())));
    serviceProvider
            .produce(new ServiceProviderBuildItem(Detector.class.getName(), getProviderNames(Detector.class.getName())));
    serviceProvider.produce(new ServiceProviderBuildItem(EncodingDetector.class.getName(),
            getProviderNames(EncodingDetector.class.getName())));

    recorder.initTikaParser(beanContainer.getValue(), configuration, tikaXmlConfiguration);
}
 
Example #10
Source File: ArtemisJmsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep
ArtemisJmsConfiguredBuildItem configure(ArtemisJmsRecorder recorder, ArtemisRuntimeConfig runtimeConfig,
        BeanContainerBuildItem beanContainer) {

    recorder.setConfig(runtimeConfig, beanContainer.getValue());
    return new ArtemisJmsConfiguredBuildItem();
}
 
Example #11
Source File: ElytronSecurityLdapProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Check to see if a LdapRealmConfig was specified and enabled and create a
 * {@linkplain org.wildfly.security.auth.realm.ldap.LdapSecurityRealm}
 *
 * @param recorder - runtime security recorder
 * @param securityRealm - the producer factory for the SecurityRealmBuildItem
 * @throws Exception - on any failure
 */
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void configureLdapRealmAuthConfig(LdapRecorder recorder,
        BuildProducer<SecurityRealmBuildItem> securityRealm,
        BeanContainerBuildItem beanContainerBuildItem //we need this to make sure ArC is initialized
) throws Exception {
    if (ldap.enabled) {
        RuntimeValue<SecurityRealm> realm = recorder.createRealm(ldap);
        securityRealm.produce(new SecurityRealmBuildItem(realm, ldap.realmName, null));
    }
}
 
Example #12
Source File: ResteasyCommonProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Record(STATIC_INIT)
@BuildStep
ResteasyInjectionReadyBuildItem setupResteasyInjection(List<ProxyUnwrapperBuildItem> proxyUnwrappers,
        BeanContainerBuildItem beanContainerBuildItem,
        ResteasyInjectorFactoryRecorder recorder) {
    List<Function<Object, Object>> unwrappers = new ArrayList<>();
    for (ProxyUnwrapperBuildItem i : proxyUnwrappers) {
        unwrappers.add(i.getUnwrapper());
    }
    RuntimeValue<InjectorFactory> injectorFactory = recorder.setup(beanContainerBuildItem.getValue(), unwrappers);
    return new ResteasyInjectionReadyBuildItem(injectorFactory);
}
 
Example #13
Source File: CamelContextProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * This build steps assembles the default implementation of a {@link CamelRuntime} responsible to bootstrap
 * Camel.
 * <p>
 * This implementation provides the minimal features for a fully functional and ready to use {@link CamelRuntime} by
 * loading all the discoverable {@link org.apache.camel.RoutesBuilder} into the auto-configured {@link CamelContext}
 * but does not perform any advanced set-up such as:
 * <ul>
 * <li>auto-configure components/languages/data-formats through properties which is then under user responsibility
 * <li>take control of the application life-cycle
 * </ul>
 * <p>
 * For advanced auto-configuration capabilities add camel-quarkus-main to the list of dependencies.
 *
 * @param  beanContainer        a reference to a fully initialized CDI bean container
 * @param  containerBeans       a list of bean known by the CDI container used to filter out auto-discovered routes from
 *                              those known by the CDI container.
 * @param  recorder             the recorder
 * @param  context              a build item providing an augmented {@link org.apache.camel.CamelContext} instance.
 * @param  customizers          a list of {@link org.apache.camel.quarkus.core.CamelContextCustomizer} used to customize
 *                              the {@link CamelContext} at {@link ExecutionTime#RUNTIME_INIT}.
 * @param  routesBuilderClasses a list of known {@link org.apache.camel.RoutesBuilder} classes.
 * @param  startList            a placeholder to ensure camel-main start after the ArC container is fully initialized.
 *                              This is required as under the hoods the camel registry may look-up beans form the
 *                              container thus we need it to be fully initialized to avoid unexpected behaviors.
 * @param  runtimeTasks         a placeholder to ensure all the runtime task are properly are done.
 *                              to the registry.
 * @return                      a build item holding a {@link CamelRuntime} instance.
 */
@Overridable
@BuildStep
@Record(value = ExecutionTime.RUNTIME_INIT, optional = true)
public CamelRuntimeBuildItem runtime(
        BeanContainerBuildItem beanContainer,
        ContainerBeansBuildItem containerBeans,
        CamelContextRecorder recorder,
        CamelContextBuildItem context,
        List<RuntimeCamelContextCustomizerBuildItem> customizers,
        List<CamelRoutesBuilderClassBuildItem> routesBuilderClasses,
        List<ServiceStartBuildItem> startList,
        List<CamelRuntimeTaskBuildItem> runtimeTasks) {

    for (CamelRoutesBuilderClassBuildItem item : routesBuilderClasses) {
        // don't add routes builders that are known by the container
        if (containerBeans.getClasses().contains(item.getDotName())) {
            continue;
        }

        recorder.addRoutes(context.getCamelContext(), item.getDotName().toString());
    }

    recorder.addRoutesFromContainer(context.getCamelContext());

    // run the customizer before starting the context to give a last second
    // chance to amend camel context setup
    for (RuntimeCamelContextCustomizerBuildItem customizer : customizers) {
        recorder.customize(context.getCamelContext(), customizer.get());
    }

    return new CamelRuntimeBuildItem(
            recorder.createRuntime(beanContainer.getValue(), context.getCamelContext()));
}
 
Example #14
Source File: SmallRyeContextPropagationProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void build(SmallRyeContextPropagationRecorder recorder,
        BeanContainerBuildItem beanContainer,
        ExecutorBuildItem executorBuildItem,
        BuildProducer<FeatureBuildItem> feature,
        BuildProducer<ManagedExecutorInitializedBuildItem> managedExecutorInitialized) {
    feature.produce(new FeatureBuildItem(Feature.SMALLRYE_CONTEXT_PROPAGATION));

    recorder.configureRuntime(beanContainer.getValue(), executorBuildItem.getExecutorProxy());
    managedExecutorInitialized.produce(new ManagedExecutorInitializedBuildItem());
}
 
Example #15
Source File: KmsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void buildClients(List<AmazonClientBuilderConfiguredBuildItem> configuredClients, KmsRecorder recorder,
        BeanContainerBuildItem beanContainer,
        ShutdownContextBuildItem shutdown) {

    buildClients(configuredClients,
            (syncBuilder) -> recorder.buildClient(syncBuilder, beanContainer.getValue(), shutdown),
            (asyncBuilder) -> recorder.buildAsyncClient(asyncBuilder, beanContainer.getValue(), shutdown));
}
 
Example #16
Source File: SesProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void buildClients(List<AmazonClientBuilderConfiguredBuildItem> configuredClients, SesRecorder recorder,
        BeanContainerBuildItem beanContainer,
        ShutdownContextBuildItem shutdown) {

    buildClients(configuredClients,
            (syncBuilder) -> recorder.buildClient(syncBuilder, beanContainer.getValue(), shutdown),
            (asyncBuilder) -> recorder.buildAsyncClient(asyncBuilder, beanContainer.getValue(), shutdown));
}
 
Example #17
Source File: SqsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void buildClients(List<AmazonClientBuilderConfiguredBuildItem> configuredClients, SqsRecorder recorder,
        BeanContainerBuildItem beanContainer,
        ShutdownContextBuildItem shutdown) {

    buildClients(configuredClients,
            (syncBuilder) -> recorder.buildClient(syncBuilder, beanContainer.getValue(), shutdown),
            (asyncBuilder) -> recorder.buildAsyncClient(asyncBuilder, beanContainer.getValue(), shutdown));
}
 
Example #18
Source File: SnsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void buildClients(List<AmazonClientBuilderConfiguredBuildItem> configuredClients, SnsRecorder recorder,
        BeanContainerBuildItem beanContainer,
        ShutdownContextBuildItem shutdown) {

    buildClients(configuredClients,
            (syncBuilder) -> recorder.buildClient(syncBuilder, beanContainer.getValue(), shutdown),
            (asyncBuilder) -> recorder.buildAsyncClient(asyncBuilder, beanContainer.getValue(), shutdown));
}
 
Example #19
Source File: DynamodbProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void buildClients(List<AmazonClientBuilderConfiguredBuildItem> configuredClients, DynamodbRecorder recorder,
        BeanContainerBuildItem beanContainer,
        ShutdownContextBuildItem shutdown) {

    buildClients(configuredClients,
            (syncBuilder) -> recorder.buildClient(syncBuilder, beanContainer.getValue(), shutdown),
            (asyncBuilder) -> recorder.buildAsyncClient(asyncBuilder, beanContainer.getValue(), shutdown));
}
 
Example #20
Source File: S3Processor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void buildClients(List<AmazonClientBuilderConfiguredBuildItem> configuredClients, S3Recorder recorder,
        BeanContainerBuildItem beanContainer,
        ShutdownContextBuildItem shutdown) {

    buildClients(configuredClients,
            (syncBuilder) -> recorder.buildClient(syncBuilder, beanContainer.getValue(), shutdown),
            (asyncBuilder) -> recorder.buildAsyncClient(asyncBuilder, beanContainer.getValue(), shutdown));
}
 
Example #21
Source File: AmazonLambdaCommonProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep()
@Record(STATIC_INIT)
public LambdaObjectMapperInitializedBuildItem initObjectMapper(BeanContainerBuildItem beanContainer, // make sure beanContainer is initialized
        AmazonLambdaMapperRecorder recorder) {
    recorder.initObjectMapper();
    return new LambdaObjectMapperInitializedBuildItem();
}
 
Example #22
Source File: TestProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * For each IConfigConsumer type, have the runtime recorder create a bean and pass in the runtime related configs
 *
 * @param recorder - runtime recorder
 * @param testBeans - types of IConfigConsumer found
 * @param beanContainer - bean container to create test bean in
 * @param runTimeConfig - The RUN_TIME config phase root config
 */
@BuildStep
@Record(RUNTIME_INIT)
void configureBeans(TestRecorder recorder, List<TestBeanBuildItem> testBeans,
        BeanContainerBuildItem beanContainer,
        TestRunTimeConfig runTimeConfig, FooRuntimeConfig fooRuntimeConfig) {
    for (TestBeanBuildItem testBeanBuildItem : testBeans) {
        Class<IConfigConsumer> beanClass = testBeanBuildItem.getConfigConsumer();
        recorder.configureBeans(beanContainer.getValue(), beanClass, buildAndRunTimeConfig, runTimeConfig,
                fooRuntimeConfig);
    }
}
 
Example #23
Source File: FunqyHttpBuildStep.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep()
@Record(STATIC_INIT)
public void staticInit(FunqyHttpBindingRecorder binding,
        BeanContainerBuildItem beanContainer, // dependency
        Optional<FunctionInitializedBuildItem> hasFunctions,
        HttpBuildTimeConfig httpConfig) throws Exception {
    if (!hasFunctions.isPresent() || hasFunctions.get() == null)
        return;

    // The context path + the resources path
    String rootPath = httpConfig.rootPath;
    binding.init();
}
 
Example #24
Source File: FhirR5Processor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep(onlyIf = FhirFlags.R5Enabled.class)
@Record(ExecutionTime.STATIC_INIT)
void recordContext(FhirContextRecorder fhirContextRecorder, BeanContainerBuildItem beanContainer,
        R5PropertiesBuildItem propertiesBuildItem) {
    fhirContextRecorder.createR5FhirContext(beanContainer.getValue(),
            getResourceDefinitions(propertiesBuildItem.getProperties()));
}
 
Example #25
Source File: FhirDstu3Processor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep(onlyIf = FhirFlags.Dstu3Enabled.class)
@Record(ExecutionTime.STATIC_INIT)
void recordContext(FhirContextRecorder fhirContextRecorder, BeanContainerBuildItem beanContainer,
        Dstu3PropertiesBuildItem propertiesBuildItem) {
    fhirContextRecorder.createDstu3FhirContext(beanContainer.getValue(),
            getResourceDefinitions(propertiesBuildItem.getProperties()));
}
 
Example #26
Source File: FhirR4Processor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep(onlyIf = FhirFlags.R4Enabled.class)
@Record(ExecutionTime.STATIC_INIT)
void recordContext(FhirContextRecorder fhirContextRecorder, BeanContainerBuildItem beanContainer,
        R4PropertiesBuildItem propertiesBuildItem) {
    fhirContextRecorder.createR4FhirContext(beanContainer.getValue(),
            getResourceDefinitions(propertiesBuildItem.getProperties()));
}
 
Example #27
Source File: FhirDstu2Processor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep(onlyIf = FhirFlags.Dstu2Enabled.class)
@Record(ExecutionTime.STATIC_INIT)
void recordContext(FhirContextRecorder fhirContextRecorder, BeanContainerBuildItem beanContainer,
        Dstu2PropertiesBuildItem propertiesBuildItem) {
    fhirContextRecorder.createDstu2FhirContext(beanContainer.getValue(),
            getResourceDefinitions(propertiesBuildItem.getProperties()));
}
 
Example #28
Source File: QuteProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelRuntimeBeanBuildItem quteComponent(CamelQuteRecorder recorder, BeanContainerBuildItem beanContainer) {
    // set the "real" Qute engine to the Camel Qute component
    return new CamelRuntimeBeanBuildItem(
            "qute",
            QuteComponent.class.getName(),
            recorder.createQuteComponent(beanContainer.getValue()));
}
 
Example #29
Source File: KubernetesProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
CamelRuntimeBeanBuildItem configureKubernetesClient(CamelKubernetesRecorder recorder,
        BeanContainerBuildItem beanContainer) {
    // Enable Kubernetes endpoints to use the client configured by the Quarkus kubernetes-client extension
    return new CamelRuntimeBeanBuildItem(
            "kubernetesClient",
            KubernetesClient.class.getName(),
            recorder.getKubernetesClient(beanContainer.getValue()));
}
 
Example #30
Source File: ReactiveStreamsProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
void publishCamelReactiveStreamsService(
        BeanContainerBuildItem beanContainer,
        ReactiveStreamsRecorder recorder,
        CamelContextBuildItem camelContext,
        ReactiveStreamsServiceFactoryBuildItem reactiveStreamsServiceFactory) {

    recorder.publishCamelReactiveStreamsService(
            beanContainer.getValue(),
            camelContext.getCamelContext(),
            reactiveStreamsServiceFactory.getValue());
}