Package org.jboss.as.controller.client.helpers.domain

Examples of org.jboss.as.controller.client.helpers.domain.ServerStatus


            processInventoryLatch.countDown();
        }
    }

    public ServerStatus determineServerStatus(final String serverName) {
        ServerStatus status;
        final String processName = ManagedServer.getServerProcessName(serverName);
        final ManagedServer client = servers.get(processName);
        if (client == null) {
            status = ServerStatus.STOPPED; // TODO move the configuration state outside
        } else {
View Full Code Here


        }
    }

    public ServerStatus restartServer(String serverName, final int gracefulTimeout, final ModelNode domainModel) {
        stopServer(serverName, gracefulTimeout);
        ServerStatus status;
        // FIXME total hack; set up some sort of notification scheme
        for (int i = 0; i < 50; i++) {
            status = determineServerStatus(serverName);
            if (status == ServerStatus.STOPPING) {
                try {
View Full Code Here

    void setHostController(HostControllerImpl hostController) {
        this.hostController = hostController;
    }

    ServerStatus determineServerStatus(final String serverName) {
        ServerStatus status;
        final String processName = ManagedServer.getServerProcessName(serverName);
        final ManagedServer client = servers.get(processName);
        if (client == null) {
            status = ServerStatus.STOPPED; // TODO move the configuration state outside
        } else {
View Full Code Here

        }
        if(!isStart) {
            resultHandler.handleResultFragment(Util.NO_LOCATION, new ModelNode().set(ServerStatus.DISABLED.toString()));
            resultHandler.handleResultComplete();
        } else {
            final ServerStatus status = hostController.getServerStatus(serverName);
            if(status != null) {
                resultHandler.handleResultFragment(Util.NO_LOCATION, new ModelNode().set(status.toString()));
                resultHandler.handleResultComplete();
            } else {
                resultHandler.handleFailed(new ModelNode().set("failed to get server status"));
            }
        }
View Full Code Here

        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final PathElement element = address.getLastElement();
        final String serverName = element.getValue();

        ServerStatus status = hostController.stopServer(serverName);
        resultHandler.handleResultFragment(ResultHandler.EMPTY_LOCATION, new ModelNode().set(status.toString()));
        final ModelNode compensating = ServerStartHandler.getStartServerOperation(serverName);
        resultHandler.handleResultComplete();
        return new BasicOperationResult(compensating);
    }
View Full Code Here

        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final PathElement element = address.getLastElement();
        final String serverName = element.getValue();

        ServerStatus status = hostController.startServer(serverName);
        resultHandler.handleResultFragment(ResultHandler.EMPTY_LOCATION, new ModelNode().set(status.toString()));
        final ModelNode compensating = ServerStopHandler.getStopServerOperation(serverName);
        resultHandler.handleResultComplete();
        return new BasicOperationResult(compensating);
    }
View Full Code Here

        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final PathElement element = address.getLastElement();
        final String serverName = element.getValue();

        ServerStatus status = hostController.restartServer(serverName);
        resultHandler.handleResultFragment(ResultHandler.EMPTY_LOCATION, new ModelNode().set(status.toString()));
        resultHandler.handleResultComplete();
        return new BasicOperationResult();
    }
View Full Code Here

    private boolean stopServer() throws Exception {
        ServerIdentity server = chooseServer(ServerStatus.STARTED);
        if (server != null) {
            System.out.println("\nStopping server " + server.getServerName() + "\n");
            ServerStatus status = client.stopServer(server.getHostName(), server.getServerName(), -1, TimeUnit.SECONDS);
            System.out.println("Stop executed. Server status is " + status);
        }
        return continuePrompt();
    }
View Full Code Here

    private boolean startServer() throws Exception {
        ServerIdentity server = chooseServer(ServerStatus.STOPPED, ServerStatus.DISABLED);
        if (server != null) {
            System.out.println("\nStarting server " + server.getServerName() + "\n");
            ServerStatus status = client.startServer(server.getHostName(), server.getServerName());
            System.out.println("Start executed. Server status is " + status);
        }
        return continuePrompt();
    }
View Full Code Here

    private boolean restartServer() throws Exception {
        ServerIdentity server = chooseServer(ServerStatus.STARTED);
        if (server != null) {
            System.out.println("\nRestarting server " + server.getServerName() + "\n");
            ServerStatus status = client.restartServer(server.getHostName(), server.getServerName(), -1, TimeUnit.SECONDS);
            System.out.println("Restart executed. Server status is " + status);
        }
        return continuePrompt();
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.client.helpers.domain.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.