Package org.jboss.as.controller.client

Examples of org.jboss.as.controller.client.Operation


                return action.execute(operation, handler, operationExecutionContext);
            }

            final ProxyController proxyExecutor = registry.getProxyController(address);
            if (proxyExecutor != null) {
                Operation newContext = operation.clone();
                newContext.getOperation().get(OP_ADDR).set(address.subAddress(proxyExecutor.getProxyNodeAddress().size()).toModelNode());
                return proxyExecutor.execute(newContext, handler);
            }


            if (isMultiStepOperation(operation.getOperation(), address)) {
View Full Code Here


            resolveOperation.get(GlobalOperationHandlers.ResolveAddressOperationHandler.ORIGINAL_OPERATION).set(operation.getOperation().require(ModelDescriptionConstants.OP));
            // Aggregate the result as collection using a hacked resolve operation and resultHandler
            final Collection<ModelNode> resolved = new ArrayList<ModelNode>();
            final AtomicInteger status = new AtomicInteger();
            final ModelNode failureResult = new ModelNode();
            final Operation resolveContext = OperationBuilder.Factory.create(resolveOperation).build();
            final ResultHandler resolveHandler = new ResultHandler() {
                @Override
                public void handleResultFragment(String[] location, ModelNode result) {
                    synchronized(failureResult) {
                        if (status.get() == 0) {
View Full Code Here

            for(final ModelNode a : resolved) {
                final ModelNode newOperation = operation.getOperation().clone();
                newOperation.get(ModelDescriptionConstants.OP_ADDR).set(a);
                multiStep.get(STEPS).add(newOperation);
            }
            final Operation multiContext = operation.clone(multiStep);
            final MultiStepOperationController multistepController = getMultiStepOperationController(multiContext, handler, operationExecutionContext);
            multistepController.resolve = false; // tell the multi step controller not to resolve again
            // Execute multi step operation
            return multistepController.execute(handler);
        }
View Full Code Here

            if (deploymentRepository != null) {
                // Store any uploaded content now
                storeDeploymentContent(operation, opNode);
            }

            Operation localOperation = operation;
            if (targets.size() > 0) {
                // clone things so our local activity doesn't affect the op
                // we send to the other hosts
                localOperation = localOperation.clone(localOperation.getOperation().clone());
            }
            pushToHost(localOperation, transaction, localHostName, futures);
            processHostFuture(localHostName, futures.remove(localHostName), hostResults);
            ModelNode hostResult = hostResults.get(localHostName);
            if (!transaction.isRollbackOnly()) {
View Full Code Here

                final ModelNode failureResult = new ModelNode();
                for(final ProxyController proxy : proxies) {
                    final PathAddress proxyAddress = proxy.getProxyNodeAddress();
                    final ModelNode newOperation = operation.clone();
                    newOperation.get(OP_ADDR).set(address.subAddress(proxyAddress.size()).toModelNode());
                    final Operation operationContext = OperationBuilder.Factory.create(newOperation).build();
                    proxy.execute(operationContext, new ResultHandler() {
                        @Override
                        public void handleResultFragment(String[] location, ModelNode result) {
                            synchronized(failureResult) {
                                if(status.get() == 0) {
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.client.Operation

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.