io.quarkus.deployment.annotations.ExecutionTime Java Examples

The following examples show how to use io.quarkus.deployment.annotations.ExecutionTime. 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: MongoClientProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep
void generateClientBeans(MongoClientRecorder recorder,
        List<MongoClientNameBuildItem> mongoClientNames,
        MongodbConfig mongodbConfig,
        Optional<MongoUnremovableClientsBuildItem> mongoUnremovableClientsBuildItem,
        BuildProducer<SyntheticBeanBuildItem> syntheticBeanBuildItemBuildProducer) {

    boolean makeUnremovable = mongoUnremovableClientsBuildItem.isPresent();

    // default blocking client
    syntheticBeanBuildItemBuildProducer.produce(createBlockingSyntheticBean(recorder, mongodbConfig, makeUnremovable,
            MongoClientBeanUtil.DEFAULT_MONGOCLIENT_NAME));
    // default reactive client
    syntheticBeanBuildItemBuildProducer.produce(createReactiveSyntheticBean(recorder, mongodbConfig, makeUnremovable,
            MongoClientBeanUtil.DEFAULT_MONGOCLIENT_NAME));

    for (MongoClientNameBuildItem mongoClientName : mongoClientNames) {
        // named blocking client
        syntheticBeanBuildItemBuildProducer
                .produce(createBlockingSyntheticBean(recorder, mongodbConfig, makeUnremovable, mongoClientName.getName()));
        // named reactive client
        syntheticBeanBuildItemBuildProducer
                .produce(createReactiveSyntheticBean(recorder, mongodbConfig, makeUnremovable, mongoClientName.getName()));
    }
}
 
Example #2
Source File: XsltProcessor.java    From camel-quarkus with Apache License 2.0 6 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelBeanBuildItem xsltComponent(
        CamelXsltRecorder recorder,
        CamelXsltConfig config,
        List<UriResolverEntryBuildItem> uriResolverEntries) {

    final RuntimeValue<Builder> builder = recorder.createRuntimeUriResolverBuilder();
    for (UriResolverEntryBuildItem entry : uriResolverEntries) {
        recorder.addRuntimeUriResolverEntry(
                builder,
                entry.getTemplateUri(),
                entry.getTransletClassName());
    }

    return new CamelBeanBuildItem(
            "xslt",
            XsltComponent.class.getName(),
            recorder.createXsltComponent(config, builder));
}
 
Example #3
Source File: ElytronPropertiesProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
/**
 * Check to see if a PropertiesRealmConfig was specified and enabled and create a
 * {@linkplain org.wildfly.security.auth.realm.LegacyPropertiesSecurityRealm}
 * runtime value to process the user/roles properties files. This also registers the names of the user/roles properties
 * files
 * to include the build artifact.
 *
 * @param recorder - runtime security recorder
 * @param securityRealm - the producer factory for the SecurityRealmBuildItem
 * @return the AuthConfigBuildItem for the realm authentication mechanism if there was an enabled PropertiesRealmConfig,
 *         null otherwise
 * @throws Exception - on any failure
 */
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void configureFileRealmAuthConfig(ElytronPropertiesFileRecorder recorder,
        BuildProducer<NativeImageResourceBuildItem> resources,
        BuildProducer<SecurityRealmBuildItem> securityRealm) throws Exception {
    if (propertiesConfig.file.enabled) {
        PropertiesRealmConfig realmConfig = propertiesConfig.file;
        log.debugf("Configuring from PropertiesRealmConfig, users=%s, roles=%s", realmConfig.users,
                realmConfig.roles);
        // Have the runtime recorder create the LegacyPropertiesSecurityRealm and create the build item
        RuntimeValue<SecurityRealm> realm = recorder.createRealm(realmConfig);
        securityRealm
                .produce(new SecurityRealmBuildItem(realm, realmConfig.realmName, recorder.loadRealm(realm, realmConfig)));
        // Return the realm authentication mechanism build item
    }
}
 
Example #4
Source File: HttpSecurityProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
SyntheticBeanBuildItem initBasicAuth(
        HttpSecurityRecorder recorder,
        HttpBuildTimeConfig buildTimeConfig) {
    if ((buildTimeConfig.auth.form.enabled || isMtlsClientAuthenticationEnabled(buildTimeConfig))
            && !buildTimeConfig.auth.basic) {
        //if form auth is enabled and we are not then we don't install
        return null;
    }
    SyntheticBeanBuildItem.ExtendedBeanConfigurator configurator = SyntheticBeanBuildItem
            .configure(BasicAuthenticationMechanism.class)
            .types(HttpAuthenticationMechanism.class)
            .setRuntimeInit()
            .scope(Singleton.class)
            .supplier(recorder.setupBasicAuth(buildTimeConfig));
    if (!buildTimeConfig.auth.form.enabled && !isMtlsClientAuthenticationEnabled(buildTimeConfig)
            && !buildTimeConfig.auth.basic) {
        //if not explicitly enabled we make this a default bean, so it is the fallback if nothing else is defined
        configurator.defaultBean();
    }

    return configurator.done();
}
 
Example #5
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 #6
Source File: DozerProcessor.java    From camel-quarkus with Apache License 2.0 6 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelBeanBuildItem configureCamelDozerBeanMappings(CamelDozerConfig camelDozerConfig,
        CamelDozerRecorder camelDozerRecorder) {

    CamelBeanBuildItem camelBeanBuildItem = null;

    if (camelDozerConfig.mappingFiles.isPresent()) {
        // Bind DozerBeanMapperConfiguration to the Camel registry for the user provided Dozer mapping files
        camelBeanBuildItem = new CamelBeanBuildItem(
                "dozerBeanMappingConfiguration",
                DozerBeanMapperConfiguration.class.getName(),
                camelDozerRecorder.createDozerBeanMapperConfiguration(camelDozerConfig.mappingFiles.get()));
    }

    return camelBeanBuildItem;
}
 
Example #7
Source File: ConfigGenerationBuildStep.java    From quarkus with Apache License 2.0 6 votes vote down vote up
/**
 * Warns if build time config properties have been changed at runtime.
 */
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
public void checkForBuildTimeConfigChange(
        ConfigChangeRecorder recorder, ConfigurationBuildItem configItem, LoggingSetupBuildItem loggingSetupBuildItem) {
    BuildTimeConfigurationReader.ReadResult readResult = configItem.getReadResult();
    Config config = ConfigProvider.getConfig();

    Map<String, String> values = new HashMap<>();
    for (RootDefinition root : readResult.getAllRoots()) {
        if (root.getConfigPhase() == ConfigPhase.BUILD_AND_RUN_TIME_FIXED ||
                root.getConfigPhase() == ConfigPhase.BUILD_TIME) {

            Iterable<ClassDefinition.ClassMember> members = root.getMembers();
            handleMembers(config, values, members, "quarkus." + root.getRootName() + ".");
        }
    }
    values.remove("quarkus.profile");
    recorder.handleConfigChange(values);
}
 
Example #8
Source File: LoggingResourceProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
LoggingSetupBuildItem setupLoggingRuntimeInit(LoggingSetupRecorder recorder, LogConfig log,
        List<LogHandlerBuildItem> handlerBuildItems,
        List<NamedLogHandlersBuildItem> namedHandlerBuildItems, List<LogConsoleFormatBuildItem> consoleFormatItems,
        Optional<ConsoleFormatterBannerBuildItem> possibleBannerBuildItem) {
    final List<RuntimeValue<Optional<Handler>>> handlers = handlerBuildItems.stream()
            .map(LogHandlerBuildItem::getHandlerValue)
            .collect(Collectors.toList());
    final List<RuntimeValue<Map<String, Handler>>> namedHandlers = namedHandlerBuildItems.stream()
            .map(NamedLogHandlersBuildItem::getNamedHandlersMap).collect(Collectors.toList());

    ConsoleFormatterBannerBuildItem bannerBuildItem = null;
    RuntimeValue<Optional<Supplier<String>>> possibleSupplier = null;
    if (possibleBannerBuildItem.isPresent()) {
        bannerBuildItem = possibleBannerBuildItem.get();
    }
    if (bannerBuildItem != null) {
        possibleSupplier = bannerBuildItem.getBannerSupplier();
    }
    recorder.initializeLogging(log, handlers, namedHandlers,
            consoleFormatItems.stream().map(LogConsoleFormatBuildItem::getFormatterValue).collect(Collectors.toList()),
            possibleSupplier);
    return new LoggingSetupBuildItem();
}
 
Example #9
Source File: JaegerProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void setupTracer(JaegerDeploymentRecorder jdr, JaegerBuildTimeConfig buildTimeConfig, JaegerConfig jaeger,
        ApplicationConfig appConfig, Capabilities capabilities, BuildProducer<MetricBuildItem> metricProducer) {

    // Indicates that this extension would like the SSL support to be enabled
    extensionSslNativeSupport.produce(new ExtensionSslNativeSupportBuildItem(Feature.JAEGER.getName()));

    if (buildTimeConfig.enabled) {
        boolean metricsEnabled = capabilities.isPresent(Capability.METRICS)
                && buildTimeConfig.metricsEnabled;
        if (metricsEnabled) {
            produceMetrics(metricProducer);
            jdr.registerTracerWithMetrics(jaeger, appConfig);
        } else {
            jdr.registerTracerWithoutMetrics(jaeger, appConfig);
        }
    }
}
 
Example #10
Source File: ElytronDeploymentProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
/**
 * Create the deployment SecurityDomain using the SecurityRealm build items that have been created.
 *
 * @param recorder - the runtime recorder class used to access runtime behaviors
 * @param realms - the previously created SecurityRealm runtime values
 * @return the SecurityDomain runtime value build item
 * @throws Exception
 */
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
SecurityDomainBuildItem build(ElytronRecorder recorder, List<SecurityRealmBuildItem> realms)
        throws Exception {
    if (realms.size() > 0) {
        // Configure the SecurityDomain.Builder from the main realm
        SecurityRealmBuildItem realmBuildItem = realms.get(0);
        RuntimeValue<SecurityDomain.Builder> securityDomainBuilder = recorder
                .configureDomainBuilder(realmBuildItem.getName(), realmBuildItem.getRealm());
        // Add any additional SecurityRealms
        for (int n = 1; n < realms.size(); n++) {
            realmBuildItem = realms.get(n);
            RuntimeValue<SecurityRealm> realm = realmBuildItem.getRealm();
            recorder.addRealm(securityDomainBuilder, realmBuildItem.getName(), realm);
        }
        // Actually build the runtime value for the SecurityDomain
        RuntimeValue<SecurityDomain> securityDomain = recorder.buildDomain(securityDomainBuilder);

        // Return the build item for the SecurityDomain runtime value
        return new SecurityDomainBuildItem(securityDomain);
    }
    return null;
}
 
Example #11
Source File: VertxHttpProcessor.java    From quarkus with Apache License 2.0 6 votes vote down vote up
@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep
void openSocket(ApplicationStartBuildItem start,
        LaunchModeBuildItem launchMode,
        CoreVertxBuildItem vertx,
        ShutdownContextBuildItem shutdown,
        BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
        HttpBuildTimeConfig httpBuildTimeConfig, HttpConfiguration httpConfiguration,
        Optional<RequireVirtualHttpBuildItem> requireVirtual,
        EventLoopCountBuildItem eventLoopCount,
        List<WebsocketSubProtocolsBuildItem> websocketSubProtocols,
        VertxHttpRecorder recorder) throws IOException {
    boolean startVirtual = requireVirtual.isPresent() || httpBuildTimeConfig.virtual;
    if (startVirtual) {
        reflectiveClass
                .produce(new ReflectiveClassBuildItem(true, false, false, VirtualServerChannel.class));
    }
    // start http socket in dev/test mode even if virtual http is required
    boolean startSocket = !startVirtual || launchMode.getLaunchMode() != LaunchMode.NORMAL;
    recorder.startServer(vertx.getVertx(), shutdown,
            httpBuildTimeConfig, httpConfiguration, launchMode.getLaunchMode(), startVirtual, startSocket,
            eventLoopCount.getEventLoopCount(),
            websocketSubProtocols.stream().map(bi -> bi.getWebsocketSubProtocols())
                    .collect(Collectors.joining(",")));
}
 
Example #12
Source File: GoogleCloudFunctionsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
public void selectDelegate(List<CloudFunctionBuildItem> cloudFunctions,
        GoogleCloudFunctionsConfig config,
        GoogleCloudFunctionRecorder recorder) throws BuildException {

    List<GoogleCloudFunctionInfo> functionInfos = cloudFunctions.stream()
            .map(CloudFunctionBuildItem::build)
            .collect(Collectors.toList());

    recorder.selectDelegate(config, functionInfos);
}
 
Example #13
Source File: DozerProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
void configureDozerTypeConverterRegistry(CamelContextBuildItem camelContextBuildItem, CamelDozerConfig camelDozerConfig,
        CamelDozerRecorder camelDozerRecorder) {

    if (camelDozerConfig.typeConverterEnabled) {
        camelDozerRecorder.initializeDozerTypeConverter(camelContextBuildItem.getCamelContext());
    }
}
 
Example #14
Source File: GoogleBigqueryProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Remove this once this extension starts supporting the native mode.
 */
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
    JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
    recorder.warnJvmInNative(FEATURE); // warn at runtime
}
 
Example #15
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 #16
Source File: CouchbaseProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Remove this once this extension starts supporting the native mode.
 */
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
    JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
    recorder.warnJvmInNative(FEATURE); // warn at runtime
}
 
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: 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 #19
Source File: ProtobufProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Remove this once this extension starts supporting the native mode.
 */
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
    JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
    recorder.warnJvmInNative(FEATURE); // warn at runtime
}
 
Example #20
Source File: GroovyProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Remove this once this extension starts supporting the native mode.
 */
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
    JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
    recorder.warnJvmInNative(FEATURE); // warn at runtime
}
 
Example #21
Source File: KmsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void configureClient(List<AmazonClientBuilderBuildItem> clients, KmsRecorder recorder,
        AmazonClientRecorder commonRecorder,
        KmsConfig runtimeConfig,
        BuildProducer<AmazonClientBuilderConfiguredBuildItem> producer) {

    initClientBuilders(clients, commonRecorder, recorder.getAwsConfig(runtimeConfig), recorder.getSdkConfig(runtimeConfig),
            buildTimeConfig.sdk, producer);
}
 
Example #22
Source File: MicroProfileMetricsProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelContextCustomizerBuildItem contextCustomizer(
        CamelMicroProfileMetricsRecorder recorder,
        CamelMicroProfileMetricsConfig config) {

    return new CamelContextCustomizerBuildItem(recorder.createContextCustomizer(config));
}
 
Example #23
Source File: MicroProfileMetricsProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelBeanBuildItem metricRegistry(CamelMicroProfileMetricsRecorder recorder) {
    return new CamelBeanBuildItem(
            MicroProfileMetricsConstants.METRIC_REGISTRY_NAME,
            MetricRegistry.class.getName(),
            recorder.createApplicationRegistry());
}
 
Example #24
Source File: SqsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void setupTransport(List<AmazonClientBuildItem> amazonClients, SqsRecorder recorder,
        AmazonClientTransportRecorder transportRecorder,
        SqsConfig runtimeConfig, BuildProducer<AmazonClientTransportsBuildItem> clientTransportBuildProducer) {

    createTransportBuilders(amazonClients,
            transportRecorder,
            buildTimeConfig.syncClient,
            recorder.getSyncConfig(runtimeConfig),
            recorder.getAsyncConfig(runtimeConfig),
            clientTransportBuildProducer);
}
 
Example #25
Source File: KmsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void setupTransport(List<AmazonClientBuildItem> amazonClients, KmsRecorder recorder,
        AmazonClientTransportRecorder transportRecorder,
        KmsConfig runtimeConfig, BuildProducer<AmazonClientTransportsBuildItem> clientTransportBuildProducer) {

    createTransportBuilders(amazonClients,
            transportRecorder,
            buildTimeConfig.syncClient,
            recorder.getSyncConfig(runtimeConfig),
            recorder.getAsyncConfig(runtimeConfig),
            clientTransportBuildProducer);
}
 
Example #26
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 #27
Source File: GrpcProcessor.java    From camel-quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Remove this once this extension starts supporting the native mode.
 */
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
    JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
    recorder.warnJvmInNative(FEATURE); // warn at runtime
}
 
Example #28
Source File: S3Processor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void configureClient(List<AmazonClientBuilderBuildItem> clients, S3Recorder recorder,
        AmazonClientRecorder commonRecorder,
        S3Config runtimeConfig,
        BuildProducer<AmazonClientBuilderConfiguredBuildItem> producer) {

    initClientBuilders(clients, commonRecorder, recorder.getAwsConfig(runtimeConfig), recorder.getSdkConfig(runtimeConfig),
            buildTimeConfig.sdk, producer);
}
 
Example #29
Source File: SqsProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void configureClient(List<AmazonClientBuilderBuildItem> clients, SqsRecorder recorder,
        AmazonClientRecorder commonRecorder,
        SqsConfig runtimeConfig,
        BuildProducer<AmazonClientBuilderConfiguredBuildItem> producer) {

    initClientBuilders(clients, commonRecorder, recorder.getAwsConfig(runtimeConfig), recorder.getSdkConfig(runtimeConfig),
            buildTimeConfig.sdk, producer);
}
 
Example #30
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));
}