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

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


    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


    private ServerStatus determineServerStatus(String serverName) {
        return determineServerStatus(getHostModel().getServer(serverName));
    }

    private ServerStatus determineServerStatus(ServerElement se) {
        ServerStatus status;
        if (se == null) {
            status = ServerStatus.DOES_NOT_EXIST;
        }
        else {
            ManagedServer client = servers.get(ManagedServer.getServerProcessName(se.getName()));
View Full Code Here

        }
        catch (Exception e) {
            log.errorf(e, "Failed to start server %s", serverName);
        }

        ServerStatus status = determineServerStatus(serverName);
        // FIXME total hack; set up some sort of notification scheme
        for (int i = 0; i < 50; i++) {
            status = determineServerStatus(serverName);
            if (status == ServerStatus.STARTING) {
                try {
View Full Code Here

            unmarshaller.finish();
        }

        @Override
        protected void sendResponse(final OutputStream output) throws IOException {
            ServerStatus serverStatus = processChange(serverName, gracefulTimeout);
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_STATUS);
            marshaller.writeObject(serverStatus);
            marshaller.finish();
View Full Code Here

            unmarshaller.finish();
        }

        @Override
        protected void sendResponse(final OutputStream outputStream) throws IOException {
            ServerStatus status = processChange(serverManagerName, serverName, gracefulTimeout);
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(outputStream));
            marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_STATUS);
            marshaller.writeObject(status);
            marshaller.finish();
View Full Code Here

                ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.RETURN_SERVER_NAME);
                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

        @Override
        protected ServerStatus receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.RETURN_SERVER_STATUS);
            ServerStatus response = unmarshal(unmarshaller, ServerStatus.class);
            unmarshaller.finish();
            return response;
        }
View Full Code Here

        }
        return result;
    }

    UpdateResultHandlerResponse<?> restartServer(ServerIdentity server, long gracefulTimeout) {
        ServerStatus status = restartServer(server.getHostName(), server.getServerName(), gracefulTimeout);
        switch (status) {
            case STARTED:
            case STARTING:
                return UpdateResultHandlerResponse.createRestartResponse();
            default: {
View Full Code Here

                expectHeader(unmarshaller, DomainClientProtocol.RETURN_SERVER_GROUP_NAME);
                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

        @Override
        protected final ServerStatus receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_SERVER_STATUS);
            final ServerStatus serverStatus = unmarshal(unmarshaller, ServerStatus.class);
            unmarshaller.finish();
            return serverStatus;
        }
View Full Code Here

TOP

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

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.