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

Examples of org.jboss.as.domain.client.api.ServerIdentity


    private byte readServerDeploymentRollback(DeploymentSetPlanResult setResult) throws IOException {

        UUID actionId = unmarshal(unmarshaller, UUID.class);
        DeploymentActionResultImpl actionResult = (DeploymentActionResultImpl) setResult.getDeploymentActionResults().get(actionId);
        ServerIdentity serverId = readServerIdentity();
        expectHeader(DomainClientProtocol.RETURN_SERVER_DEPLOYMENT_RESULT);
        @SuppressWarnings("unchecked")
        UpdateResultHandlerResponse<Void> urhr = unmarshal(unmarshaller, UpdateResultHandlerResponse.class);

        if (actionResult != null) {
            // Notifiy and listeners
            DeploymentActionImpl action = (DeploymentActionImpl) actionResult.getDeploymentAction();
            for (DomainUpdateListener<?> listener : action.getListeners()) {
                if (urhr.isCancelled()) {
                    listener.handleRollbackCancellation(serverId);
                }
                else if (urhr.getFailureResult() != null) {
                    listener.handleRollbackFailure(urhr.getFailureResult(), serverId);
                }
                else if (urhr.isRolledBack()) {
                    listener.handleRollbackFailure(new RollbackCancelledException("Rollback of deployment action " + actionId + "was itself rolled back"), serverId);
                }
                else if (urhr.isTimedOut()) {
                    listener.handleRollbackTimeout(serverId);
                }
                else {
                    listener.handleRollbackSuccess(serverId);
                }
            }

            ServerGroupDeploymentActionResult sgdar = actionResult.getResultsByServerGroup().get(serverId.getServerGroupName());
            ServerUpdateResultImpl<Void> sur = (ServerUpdateResultImpl<Void>) sgdar.getResultByServer().get(serverId.getServerName());
            sur.markRolledBack(urhr);
        }


        return unmarshaller.readByte();
View Full Code Here


        String hostName = unmarshal(unmarshaller, String.class);
        expectHeader(DomainClientProtocol.RETURN_SERVER_GROUP_NAME);
        String groupName = unmarshal(unmarshaller, String.class);
        expectHeader(DomainClientProtocol.RETURN_SERVER_NAME);
        String serverName = unmarshal(unmarshaller, String.class);
        return new ServerIdentity(hostName, groupName, serverName);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.client.api.ServerIdentity

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.