Search in sources :

Example 1 with CamelDependenciesProcessor

use of org.wildfly.extension.camel.deployment.CamelDependenciesProcessor in project wildfly-camel by wildfly-extras.

the class CamelSubsystemAdd method performBoottime.

@Override
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) {
    final GraviaSubsystemBootstrap gravia = new GraviaSubsystemBootstrap();
    gravia.getSubsystemServices(context);
    CamelBootstrapService.addService(context.getServiceTarget());
    CamelContextFactoryService.addService(context.getServiceTarget());
    CamelContextRegistryService.addService(context.getServiceTarget(), subsystemState);
    ContextCreateHandlerRegistryService.addService(context.getServiceTarget(), subsystemState);
    subsystemState.processExtensions(new Consumer<CamelSubsytemExtension>() {

        @Override
        public void accept(CamelSubsytemExtension plugin) {
            plugin.addExtensionServices(context.getServiceTarget(), subsystemState);
        }
    });
    // Register deployment unit processors
    context.addStep(new AbstractDeploymentChainStep() {

        @Override
        public void execute(final DeploymentProcessorTarget processorTarget) {
            gravia.addDeploymentUnitProcessors(processorTarget);
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_DEPLOYMENT_SETTINGS, new CamelDeploymentSettingsProcessor());
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_CAMEL_CONTEXT_DESCRIPTORS, new CamelContextDescriptorsProcessor());
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_CAMEL_INTEGRATION, new CamelIntegrationProcessor());
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_CAMEL_WIRINGS, new CamelDependenciesProcessor());
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.INSTALL, INSTALL_PACKAGE_SCAN_RESOLVER, new PackageScanResolverProcessor());
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.INSTALL, INSTALL_CAMEL_CONTEXT_CREATE, new CamelContextBootstrapProcessor());
            processorTarget.addDeploymentProcessor(CamelExtension.SUBSYSTEM_NAME, Phase.INSTALL, INSTALL_CONTEXT_ACTIVATION, new CamelContextActivationProcessor());
            subsystemState.processExtensions(new Consumer<CamelSubsytemExtension>() {

                @Override
                public void accept(CamelSubsytemExtension plugin) {
                    plugin.addDeploymentProcessor(processorTarget, subsystemState);
                }
            });
        }
    }, OperationContext.Stage.RUNTIME);
}
Also used : CamelDeploymentSettingsProcessor(org.wildfly.extension.camel.deployment.CamelDeploymentSettingsProcessor) CamelIntegrationProcessor(org.wildfly.extension.camel.deployment.CamelIntegrationProcessor) GraviaSubsystemBootstrap(org.wildfly.extension.gravia.parser.GraviaSubsystemBootstrap) CamelSubsytemExtension(org.wildfly.extension.camel.CamelSubsytemExtension) PackageScanResolverProcessor(org.wildfly.extension.camel.deployment.PackageScanResolverProcessor) DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) Consumer(java.util.function.Consumer) CamelContextActivationProcessor(org.wildfly.extension.camel.deployment.CamelContextActivationProcessor) CamelContextBootstrapProcessor(org.wildfly.extension.camel.deployment.CamelContextBootstrapProcessor) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep) CamelContextDescriptorsProcessor(org.wildfly.extension.camel.deployment.CamelContextDescriptorsProcessor) CamelDependenciesProcessor(org.wildfly.extension.camel.deployment.CamelDependenciesProcessor)

Aggregations

Consumer (java.util.function.Consumer)1 AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)1 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)1 CamelSubsytemExtension (org.wildfly.extension.camel.CamelSubsytemExtension)1 CamelContextActivationProcessor (org.wildfly.extension.camel.deployment.CamelContextActivationProcessor)1 CamelContextBootstrapProcessor (org.wildfly.extension.camel.deployment.CamelContextBootstrapProcessor)1 CamelContextDescriptorsProcessor (org.wildfly.extension.camel.deployment.CamelContextDescriptorsProcessor)1 CamelDependenciesProcessor (org.wildfly.extension.camel.deployment.CamelDependenciesProcessor)1 CamelDeploymentSettingsProcessor (org.wildfly.extension.camel.deployment.CamelDeploymentSettingsProcessor)1 CamelIntegrationProcessor (org.wildfly.extension.camel.deployment.CamelIntegrationProcessor)1 PackageScanResolverProcessor (org.wildfly.extension.camel.deployment.PackageScanResolverProcessor)1 GraviaSubsystemBootstrap (org.wildfly.extension.gravia.parser.GraviaSubsystemBootstrap)1