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

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


    }

    public Map<ServerIdentity, ServerStatus> getServerStatuses() {
        Map<ServerIdentity, ServerStatus> result = new HashMap<ServerIdentity, ServerStatus>();
        for (ServerElement se : getHostModel().getServers()) {
            ServerIdentity id = new ServerIdentity(getName(), se.getServerGroup(), se.getName());
            ServerStatus status = determineServerStatus(se);
            result.put(id, status);
        }
        return result;
    }
View Full Code Here


        Map<ServerIdentity, List<AbstractServerModelUpdate<?>>> updatesByServer =
                getUpdatesByServer(updates, hostResults, serverByHost);

        // TODO Add param to configure pushing out concurrently
        for (Map.Entry<ServerIdentity, List<AbstractServerModelUpdate<?>>> entry : updatesByServer.entrySet()) {
            ServerIdentity server = entry.getKey();
            List<AbstractServerModelUpdate<?>> serverUpdates = entry.getValue();
            // Push them out
            List<UpdateResultHandlerResponse<?>> rsps = applyUpdatesToServer(server, serverUpdates,
                    allowOverallRollback);
            for (int i = 0; i < serverUpdates.size(); i++) {
View Full Code Here

        }
        List<ServerIdentity> ids = new ArrayList<ServerIdentity>(serverNames.size());
        String hostName = hostModel.getName();
        for (String server : serverNames) {
            ServerElement se = hostModel.getServer(server);
            ids.add(new ServerIdentity(hostName, se.getServerGroup(), server));
        }
        return ids;
    }
View Full Code Here

        }
        List<ServerIdentity> ids = new ArrayList<ServerIdentity>(serverNames.size());
        String hostName = hostModel.getName();
        for (String server : serverNames) {
            ServerElement se = hostModel.getServer(server);
            ids.add(new ServerIdentity(hostName, se.getServerGroup(), server));
        }
        return ids;
    }
View Full Code Here

            String hostName = unmarshaller.readUTF();
            expectHeader(unmarshaller, DomainClientProtocol.PARAM_SERVER_GROUP_NAME);
            String serverGroupName = unmarshaller.readUTF();
            expectHeader(unmarshaller, DomainClientProtocol.PARAM_SERVER_NAME);
            String serverName = unmarshaller.readUTF();
            server = new ServerIdentity(hostName, serverGroupName, serverName);
            expectHeader(unmarshaller, DomainClientProtocol.PARAM_SERVER_MODEL_UPDATE);
            update = unmarshal(unmarshaller, AbstractServerModelUpdate.class);
            unmarshaller.finish();
            log.infof("Received server model update %s", update);
        }
View Full Code Here

            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(outputStream));
            marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_STATUS_COUNT);
            marshaller.writeInt(statuses.size());
            for (Map.Entry<ServerIdentity, ServerStatus> entry : statuses.entrySet()) {
                ServerIdentity id = entry.getKey();
                marshaller.writeByte(DomainClientProtocol.RETURN_HOST_NAME);
                marshaller.writeUTF(id.getHostName());
                marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_GROUP_NAME);
                marshaller.writeUTF(id.getServerGroupName());
                marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_NAME);
                marshaller.writeUTF(id.getServerName());
                marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_STATUS);
                marshaller.writeObject(entry.getValue());
            }
            marshaller.finish();
        }
View Full Code Here

                String serverName = unmarshaller.readUTF();
                ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.RETURN_SERVER_GROUP_NAME);
                String groupName = unmarshaller.readUTF();
                ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.RETURN_SERVER_STATUS);
                ServerStatus status = unmarshal(unmarshaller, ServerStatus.class);
                map.put(new ServerIdentity(id, groupName, serverName), status);
            }
            return map;
        }
View Full Code Here

        log.debugf("updates affect %s", updatesByServer.keySet());

        // TODO Add param to configure pushing out concurrently
        for (Map.Entry<ServerIdentity, List<AbstractServerModelUpdate<?>>> entry : updatesByServer.entrySet()) {
            ServerIdentity server = entry.getKey();
            List<AbstractServerModelUpdate<?>> serverUpdates = entry.getValue();
            // Push them out
            List<UpdateResultHandlerResponse<?>> rsps = applyUpdatesToServer(server, serverUpdates, allowOverallRollback);
            for (int i = 0; i < serverUpdates.size(); i++) {
                UpdateResultHandlerResponse<?> rsp = rsps.get(i);
View Full Code Here

                final String groupName = unmarshaller.readUTF();
                expectHeader(unmarshaller, DomainClientProtocol.RETURN_SERVER_NAME);
                final String serverName = unmarshaller.readUTF();
                expectHeader(unmarshaller, DomainClientProtocol.RETURN_SERVER_STATUS);
                final ServerStatus serverStatus = unmarshal(unmarshaller, ServerStatus.class);
                results.put(new ServerIdentity(hostName, groupName, serverName), serverStatus);
            }
            unmarshaller.finish();
            return results;
        }
View Full Code Here

    private byte readServerDeploymentResult(Map<UUID, DeploymentActionResult> actionResults) throws IOException {

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

        ServerUpdateResult<Void> sur = new ServerUpdateResultImpl<Void>(actionId, serverId, urhr);
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.