Package org.jboss.as.domain.client.api.deployment

Examples of org.jboss.as.domain.client.api.deployment.DeploymentAction


        // Execute domain model update on domain controller and server managers
        List<DomainUpdateApplierResponse> rsps = domainController.applyUpdatesToModel(updateSet.getDomainUpdates());

        // Inform client of results
        pushSingleResponse(responseQueue, new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_SET_ID, updateSet.setPlan.getId()));
        DeploymentAction lastResponseAction = null;
        for (int i = 0; i < rsps.size(); i++) {
            DomainUpdateApplierResponse duar = rsps.get(i);
            // There can be multiple domain updates for a given action, but we
            // only send one response. Use this update result for the response if
            // 1) it failed or 2) it's the last update associated with the action
            if (duar.getDomainFailure() != null || duar.getHostFailures().size() > 0 || updateSet.isLastDomainUpdateForAction(i)) {
                DeploymentAction action = updateSet.getDeploymentActionForDomainUpdate(i);
                if (action != lastResponseAction) {
                    List<StreamedResponse> rspList = new ArrayList<StreamedResponse>(2);
                    rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_ID, action.getId()));
                    rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_MODEL_RESULT, duar));
                    responseQueue.put(rspList);
                    lastResponseAction = action;
                }
            }
View Full Code Here


        // Execute domain model update on domain controller and server managers
        List<DomainUpdateApplierResponse> rsps = domainController.applyUpdatesToModel(updateSet.getDomainRollbacks());

        // Inform client of results
        pushSingleResponse(responseQueue, new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_SET_ROLLBACK, updateSet.setPlan.getId()));
        DeploymentAction lastResponseAction = null;
        for (int i = 0; i < rsps.size(); i++) {
            DomainUpdateApplierResponse duar = rsps.get(i);
            // There can be multiple domain updates for a given action, but we
            // only send one response. Use this update result for the response if
            // 1) it failed or 2) it's the last update associated with the action
            if (duar.getDomainFailure() != null || duar.getHostFailures().size() > 0 || updateSet.isLastDomainRollbackForAction(i)) {
                DeploymentAction action = updateSet.getDeploymentActionForDomainUpdate(i);
                if (action != lastResponseAction) {
                    List<StreamedResponse> rspList = new ArrayList<StreamedResponse>(2);
                    rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_ID, action.getId()));
                    rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_MODEL_RESULT, duar));
                    responseQueue.put(rspList);
                    lastResponseAction = action;
                }
            }
View Full Code Here

                    updates.serverResults.put(serverId, rsps);
                }
                updatePolicy.recordServerResult(serverId, rsps);

                // Push responses to client
                DeploymentAction lastResponseAction = null;
                for (int i = 0; i < rsps.size(); i++) {
                    UpdateResultHandlerResponse<?> urhr = rsps.get(i);
                    // There can be multiple server updates for a given action, but we
                    // only send one response. Use this update result for the response if
                    // 1) it failed or 2) it's the last update associated with the action
                    boolean sendResponse = urhr.getFailureResult() != null;
                    if (!sendResponse) {
                        sendResponse = forRollback ? updates.isLastServerRollbackUpdateForAction(i)
                                                   : updates.isLastServerUpdateForAction(i);
                    }
                    if (sendResponse) {
                        DeploymentAction action = forRollback ? updates.getDeploymentActionForServerRollbackUpdate(i)
                                                              : updates.getDeploymentActionForServerUpdate(i);
                        if (action != lastResponseAction) {
                            sendServerUpdateResult(action.getId(), urhr);
                            lastResponseAction = action;
                        }
                    }
                }
            }
View Full Code Here

    private final DeploymentAction undeployModification;

    UndeployDeploymentPlanBuilderImpl(DeploymentPlanBuilderImpl existing, DeploymentSetPlanImpl setPlan, boolean replace) {
        super(existing, setPlan, replace);
        DeploymentAction modification = setPlan.getLastAction();
        if (modification.getType() != DeploymentAction.Type.UNDEPLOY) {
            throw new IllegalStateException("Invalid action type " + modification.getType());
        }
        this.undeployModification = modification;
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.client.api.deployment.DeploymentAction

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.