Examples of StopCommand


Examples of com.cloud.agent.api.StopCommand

        if (vm.getState() != State.Stopping) {
            throw new CloudRuntimeException("We cannot proceed with stop VM " + vm + " since it is not in 'Stopping' state, current state: " + vm.getState());
        }

        vmGuru.prepareStop(profile);
        StopCommand stop = new StopCommand(vm, _mgmtServer.getExecuteInSequence());
        boolean stopped = false;
        StopAnswer answer = null;
        try {
            answer = (StopAnswer) _agentMgr.send(vm.getHostId(), stop);
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        VirtualMachineGuru<? extends VMInstanceVO> guru = _vmGurus.get(type);
        return guru.findById(vmId);
    }

    public Command cleanup(VirtualMachine vm) {
        return new StopCommand(vm, _mgmtServer.getExecuteInSequence());
    }
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

    public Command cleanup(VirtualMachine vm) {
        return new StopCommand(vm, _mgmtServer.getExecuteInSequence());
    }

    public Command cleanup(String vmName) {
        return new StopCommand(vmName, _mgmtServer.getExecuteInSequence());
    }
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

                        } else {
                            if (s_logger.isDebugEnabled()) {
                                s_logger.info("The guru did not like the answers so stopping " + vm);
                            }
                          
                            StopCommand cmd = new StopCommand(vm.getInstanceName());
                            StopAnswer answer = (StopAnswer) _agentMgr.easySend(destHostId, cmd);
                            if (answer == null || !answer.getResult()) {
                                s_logger.warn("Unable to stop " + vm + " due to " + (answer != null ? answer.getDetails() : "no answers"));
                                _haMgr.scheduleStop(vm, destHostId, WorkType.ForceStop);
                                throw new ExecutionException("Unable to stop " + vm + " so we are unable to retry the start operation");
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        }
    }

    protected <T extends VMInstanceVO> boolean sendStop(VirtualMachineGuru<T> guru, VirtualMachineProfile<T> profile, boolean force) {
        VMInstanceVO vm = profile.getVirtualMachine();
        StopCommand stop = new StopCommand(vm, vm.getInstanceName(), null);
        try {
            Answer answer = _agentMgr.send(vm.getHostId(), stop);
            if (!answer.getResult()) {
                s_logger.debug("Unable to stop VM due to " + answer.getDetails());
                return false;
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

            throw new CloudRuntimeException("We cannot proceed with stop VM " + vm + " since it is not in 'Stopping' state, current state: " + vm.getState());
        }

        vmGuru.prepareStop(profile);
       
        StopCommand stop = new StopCommand(vm, vm.getInstanceName(), null);
        boolean stopped = false;
        StopAnswer answer = null;
        try {
            answer = (StopAnswer) _agentMgr.send(vm.getHostId(), stop);
            stopped = answer.getResult();
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        VirtualMachineGuru<? extends VMInstanceVO> guru = _vmGurus.get(type);
        return guru.findById(vmId);
    }

    public Command cleanup(String vmName) {
        return new StopCommand(vmName);
    }
View Full Code Here

Examples of nfc.sample.peer2peer.commands.StopCommand

            e.printStackTrace();
            Utilities.log("XXXX NfcSnepResponder Exception on obtaining NDEFPushManager: " + e.getMessage());
        }
       
        _miStop.setCommandContext(this);
        _miStop.setCommand(new Command(new StopCommand(this)));

        _miStart.setCommandContext(this);
        _miStart.setCommand(new Command(new StartCommand(this)));

        Font default_font = Font.getDefault();
View Full Code Here

Examples of nfc.sample.virtual.target.commands.StopCommand

            emulateSmartCard();
        } else {
            emulateReader();
        }
        mi_stop.setCommandContext(this);
        mi_stop.setCommand(new Command(new StopCommand(this)));
        addMenuItem(mi_stop);

        mi_start.setCommandContext(this);
        mi_start.setCommand(new Command(new StartCommand(this)));
View Full Code Here

Examples of org.apache.geronimo.deployment.plugin.local.StopCommand

    public ProgressObject stop(TargetModuleID[] moduleIDList) {
        if (kernel == null) {
            throw new IllegalStateException("Disconnected");
        }
        StopCommand command = new StopCommand(kernel, moduleIDList);
        command.setCommandContext(commandContext);
        new Thread(command).start();
        return command;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.