Search in sources :

Example 1 with Builder

use of org.apache.camel.quarkus.core.FastFactoryFinderResolver.Builder in project camel-quarkus by apache.

the class CamelProcessor method camelServices.

@BuildStep
void camelServices(ApplicationArchivesBuildItem applicationArchives, List<CamelServicePatternBuildItem> servicePatterns, BuildProducer<CamelServiceBuildItem> camelServices) {
    final PathFilter pathFilter = servicePatterns.stream().filter(patterns -> patterns.getDestination() == CamelServiceDestination.DISCOVERY).collect(PathFilter.Builder::new, (builder, patterns) -> builder.patterns(patterns.isInclude(), patterns.getPatterns()), PathFilter.Builder::combine).build();
    CamelSupport.services(applicationArchives, pathFilter).forEach(camelServices::produce);
}
Also used : UnremovableBeanBuildItem(io.quarkus.arc.deployment.UnremovableBeanBuildItem) CamelComponentNameResolverBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelComponentNameResolverBuildItem) LoggerFactory(org.slf4j.LoggerFactory) Overridable(io.quarkus.deployment.annotations.Overridable) CamelTypeConverterRegistryBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelTypeConverterRegistryBuildItem) CamelServicePatternBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelServicePatternBuildItem) ClassInfo(org.jboss.jandex.ClassInfo) CombinedIndexBuildItem(io.quarkus.deployment.builditem.CombinedIndexBuildItem) BuildProducer(io.quarkus.deployment.annotations.BuildProducer) Capabilities(io.quarkus.deployment.Capabilities) AdditionalBeanBuildItem(io.quarkus.arc.deployment.AdditionalBeanBuildItem) BaseTypeConverterRegistry(org.apache.camel.impl.converter.BaseTypeConverterRegistry) CamelModelJAXBContextFactoryBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelModelJAXBContextFactoryBuildItem) CamelRecorder(org.apache.camel.quarkus.core.CamelRecorder) CamelServiceDestination(org.apache.camel.quarkus.core.deployment.spi.CamelServiceDestination) AnnotationTarget(org.jboss.jandex.AnnotationTarget) Path(java.nio.file.Path) TypeConverterLoader(org.apache.camel.spi.TypeConverterLoader) Builder(org.apache.camel.quarkus.core.FastFactoryFinderResolver.Builder) BeanRegistrationPhaseBuildItem(io.quarkus.arc.deployment.BeanRegistrationPhaseBuildItem) Predicate(java.util.function.Predicate) CamelModelToXMLDumperBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelModelToXMLDumperBuildItem) ExecutionTime(io.quarkus.deployment.annotations.ExecutionTime) Set(java.util.Set) NativeImageResourceBuildItem(io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) List(java.util.List) RoutesBuilderClassExcludeBuildItem(org.apache.camel.quarkus.core.deployment.spi.RoutesBuilderClassExcludeBuildItem) Modifier(java.lang.reflect.Modifier) CamelProducers(org.apache.camel.quarkus.core.CamelProducers) CamelRoutesBuilderClassBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelRoutesBuilderClassBuildItem) ReflectiveClassBuildItem(io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem) Record(io.quarkus.deployment.annotations.Record) CamelSupport(org.apache.camel.quarkus.core.deployment.util.CamelSupport) DotName(org.jboss.jandex.DotName) Type(org.jboss.jandex.Type) ContainerBeansBuildItem(org.apache.camel.quarkus.core.deployment.spi.ContainerBeansBuildItem) TreeSet(java.util.TreeSet) HashSet(java.util.HashSet) BuildStep(io.quarkus.deployment.annotations.BuildStep) ArtifactKey(io.quarkus.maven.dependency.ArtifactKey) RuntimeValue(io.quarkus.runtime.RuntimeValue) TypeConverterRegistry(org.apache.camel.spi.TypeConverterRegistry) IndexView(org.jboss.jandex.IndexView) CamelCapabilities(org.apache.camel.quarkus.core.CamelCapabilities) SchemaResource(org.apache.camel.quarkus.core.deployment.catalog.SchemaResource) CamelFactoryFinderResolverBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelFactoryFinderResolverBuildItem) Logger(org.slf4j.Logger) ApplicationArchivesBuildItem(io.quarkus.deployment.builditem.ApplicationArchivesBuildItem) FileUtils(org.apache.camel.quarkus.core.util.FileUtils) Files(java.nio.file.Files) PathFilter(org.apache.camel.quarkus.core.deployment.util.PathFilter) CamelTypeConverterLoaderBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelTypeConverterLoaderBuildItem) IOException(java.io.IOException) CamelServiceFilterBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelServiceFilterBuildItem) BuildTimeCamelCatalog(org.apache.camel.quarkus.core.deployment.catalog.BuildTimeCamelCatalog) Converter(org.apache.camel.Converter) ApplicationArchive(io.quarkus.deployment.ApplicationArchive) CamelConfig(org.apache.camel.quarkus.core.CamelConfig) BuildTimeCamelCatalogBuildItem(org.apache.camel.quarkus.core.deployment.spi.BuildTimeCamelCatalogBuildItem) CamelServiceBuildItem(org.apache.camel.quarkus.core.deployment.spi.CamelServiceBuildItem) BuildTimeJsonSchemaResolver(org.apache.camel.quarkus.core.deployment.catalog.BuildTimeJsonSchemaResolver) BuildExtension(io.quarkus.arc.processor.BuildExtension) CamelConfigFlags(org.apache.camel.quarkus.core.CamelConfigFlags) CamelServiceFilter(org.apache.camel.quarkus.core.deployment.spi.CamelServiceFilter) PathFilter(org.apache.camel.quarkus.core.deployment.util.PathFilter) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Aggregations

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 Capabilities (io.quarkus.deployment.Capabilities)1 BuildProducer (io.quarkus.deployment.annotations.BuildProducer)1 BuildStep (io.quarkus.deployment.annotations.BuildStep)1 ExecutionTime (io.quarkus.deployment.annotations.ExecutionTime)1 Overridable (io.quarkus.deployment.annotations.Overridable)1 Record (io.quarkus.deployment.annotations.Record)1 ApplicationArchivesBuildItem (io.quarkus.deployment.builditem.ApplicationArchivesBuildItem)1 CombinedIndexBuildItem (io.quarkus.deployment.builditem.CombinedIndexBuildItem)1 NativeImageResourceBuildItem (io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem)1 ReflectiveClassBuildItem (io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem)1 ArtifactKey (io.quarkus.maven.dependency.ArtifactKey)1 RuntimeValue (io.quarkus.runtime.RuntimeValue)1 IOException (java.io.IOException)1 Modifier (java.lang.reflect.Modifier)1 StandardCharsets (java.nio.charset.StandardCharsets)1