All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.cxf.ws.rm.deployment.WsReliableMessagingProcessor Maven / Gradle / Ivy

package io.quarkiverse.cxf.ws.rm.deployment;

import java.util.stream.Stream;

import org.apache.cxf.ws.rm.feature.RMFeature;

import io.quarkiverse.cxf.deployment.CxfRouteRegistrationRequestorBuildItem;
import io.quarkiverse.cxf.ws.rm.DefaultRmFeatureProducer;
import io.quarkiverse.cxf.ws.rm.WsRmFactoryCustomizer;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;

public class WsReliableMessagingProcessor {
    private static final String FEATURE = "cxf-rt-ws-rm";

    @BuildStep
    FeatureBuildItem feature() {
        return new FeatureBuildItem(FEATURE);
    }

    @BuildStep
    void indexDependencies(BuildProducer indexDependencies) {
        Stream.of(
                "org.apache.cxf:cxf-rt-ws-rm",
                "org.apache.cxf:cxf-rt-management")
                .forEach(ga -> {
                    String[] coords = ga.split(":");
                    indexDependencies.produce(new IndexDependencyBuildItem(coords[0], coords[1]));
                });
    }

    @BuildStep
    void runtimeInitializedClass(BuildProducer runtimeInitializedClass) {
        Stream.of(
                "org.apache.cxf.ws.rm.ManagedRMEndpoint")
                .map(RuntimeInitializedClassBuildItem::new)
                .forEach(runtimeInitializedClass::produce);
    }

    @BuildStep
    void additionalBeans(BuildProducer additionalBeans) {
        additionalBeans.produce(
                new AdditionalBeanBuildItem(WsRmFactoryCustomizer.class, DefaultRmFeatureProducer.class, RMFeature.class));
    }

    @BuildStep
    CxfRouteRegistrationRequestorBuildItem requestCxfRouteRegistration() {
        return new CxfRouteRegistrationRequestorBuildItem(FEATURE);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy