Package org.jboss.as.controller

Examples of org.jboss.as.controller.ServiceVerificationHandler


        context.completeStep();

    }

    private void installService(OperationContext context, ModelNode operation, ServiceTarget serviceTarget, String name) {
        final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
        final HandlerFileService service = new HandlerFileService(operation.get(CommonAttributes.PATH).asString());
        final ServiceBuilder<?> builder = serviceTarget.addService(LogServices.handlerFileName(name), service);
        if (operation.hasDefined(CommonAttributes.RELATIVE_TO)) {
            builder.addDependency(AbstractPathService.pathNameOf(operation.get(RELATIVE_TO).asString()), String.class, service.getRelativeToInjector());
        }
View Full Code Here


        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final ServiceTarget target = context.getServiceTarget();
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                    try {

                        final RootLoggerService service = new RootLoggerService();
                        service.setLevel(Level.parse(level));
                        target.addService(LogServices.ROOT_LOGGER, service)
View Full Code Here

        if (requiresRuntime(context)) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final List<ServiceController<?>> controllers = new ArrayList<ServiceController<?>>();
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                    final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
                    final String name = address.getLastElement().getValue();
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
                    @SuppressWarnings("unchecked")
                    final ServiceController<Handler> controller = (ServiceController<Handler>) serviceRegistry.getService(LogServices.handlerName(name));
View Full Code Here

            }

            context.addStep(new OperationStepHandler() {
                public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                    final List<ServiceController<?>> controllers = new ArrayList<ServiceController<?>>();
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                    performRuntime(context, operation, model, verificationHandler, controllers, scheduledExecutorService, bootTimeScanner);
                    context.addStep(verificationHandler, OperationContext.Stage.VERIFY);

                    context.completeStep(new OperationContext.RollbackHandler() {
                        @Override
View Full Code Here

    @Override
    protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> handbackHolder) throws OperationFailedException {
        final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS);
        final ModelNode subModel = resource.getModel();
        final ServiceVerificationHandler handler = new ServiceVerificationHandler();
        updateHttpManagementService(context, subModel, hostControllerInfo, environment, handler);
        context.addStep(handler, OperationContext.Stage.VERIFY);

        return false;
    }
View Full Code Here

    @Override
    protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> handbackHolder) throws OperationFailedException {
        final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS);
        final ModelNode subModel = resource.getModel();
        final ServiceVerificationHandler handler = new ServiceVerificationHandler();
        updateHttpManagementService(context, subModel, hostControllerInfo, environment, handler);
        context.addStep(handler, OperationContext.Stage.VERIFY);

        return false;
    }
View Full Code Here

    protected boolean applyUpdateToRuntime(final OperationContext context, final ModelNode operation,
                                           final String attributeName, final ModelNode resolvedValue,
                                           final ModelNode currentValue, HandbackHolder<Void> handbackHolder) throws OperationFailedException {

        final ModelNode subModel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel();
        final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
        context.addStep(verificationHandler, OperationContext.Stage.VERIFY);
        installNativeManagementService(context, subModel, verificationHandler);
        return false;
    }
View Full Code Here

        if(context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                @Override
                public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                    final ServiceTarget target = context.getServiceTarget();
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                    JMXConnectorService.addService(target, serverBinding, registryBinding, verificationHandler);
                    context.addStep(verificationHandler, OperationContext.Stage.VERIFY);
                    if(context.completeStep() == OperationContext.ResultAction.ROLLBACK) {
                        context.removeService(JMXConnectorService.SERVICE_NAME);
                    }
View Full Code Here

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();

                    ModifiableResourceAdaptors resourceAdapters = buildResourceAdaptersObject(operation);

                    final ServiceController<?> raService = context.getServiceRegistry(false).getService(
                            ConnectorServices.RESOURCEADAPTERS_SERVICE);
View Full Code Here

                final Properties securityPropertiesStr = securityProperties;

                context.addStep(new OperationStepHandler() {
                    public void execute(OperationContext context, ModelNode operation) {
                        final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                        log.info("Activating Security Subsystem");

                        final ServiceTarget target = context.getServiceTarget();

                        // add bootstrap service
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.ServiceVerificationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.