Search in sources :

Example 1 with DeploymentProcessor

use of org.wildfly.extension.microprofile.health.deployment.DeploymentProcessor in project wildfly by wildfly.

the class MicroProfileHealthSubsystemAdd method performBoottime.

@Override
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
    super.performBoottime(context, operation, model);
    context.addStep(new AbstractDeploymentChainStep() {

        public void execute(DeploymentProcessorTarget processorTarget) {
            processorTarget.addDeploymentProcessor(MicroProfileHealthExtension.SUBSYSTEM_NAME, DEPENDENCIES, DEPENDENCIES_MICROPROFILE_HEALTH, new DependencyProcessor());
            processorTarget.addDeploymentProcessor(MicroProfileHealthExtension.SUBSYSTEM_NAME, POST_MODULE, POST_MODULE_MICROPROFILE_HEALTH, new DeploymentProcessor());
        }
    }, RUNTIME);
    final boolean securityEnabled = MicroProfileHealthSubsystemDefinition.SECURITY_ENABLED.resolveModelAttribute(context, model).asBoolean();
    final String emptyLivenessChecksStatus = MicroProfileHealthSubsystemDefinition.EMPTY_LIVENESS_CHECKS_STATUS.resolveModelAttribute(context, model).asString();
    final String emptyReadinessChecksStatus = MicroProfileHealthSubsystemDefinition.EMPTY_READINESS_CHECKS_STATUS.resolveModelAttribute(context, model).asString();
    final String emptyStartupChecksStatus = MicroProfileHealthSubsystemDefinition.EMPTY_STARTUP_CHECKS_STATUS.resolveModelAttribute(context, model).asString();
    HealthHTTPSecurityService.install(context, securityEnabled);
    MicroProfileHealthReporterService.install(context, emptyLivenessChecksStatus, emptyReadinessChecksStatus, emptyStartupChecksStatus);
    MicroProfileHealthContextService.install(context);
    MicroProfileHealthLogger.LOGGER.activatingSubsystem();
}
Also used : DependencyProcessor(org.wildfly.extension.microprofile.health.deployment.DependencyProcessor) DeploymentProcessor(org.wildfly.extension.microprofile.health.deployment.DeploymentProcessor) DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep)

Aggregations

AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)1 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)1 DependencyProcessor (org.wildfly.extension.microprofile.health.deployment.DependencyProcessor)1 DeploymentProcessor (org.wildfly.extension.microprofile.health.deployment.DeploymentProcessor)1