use of org.wildfly.extension.camel.deployment.CamelContextDescriptorsProcessor 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);
}
Aggregations