public void stop() { log.info("Stopping server " + getLabel().getName()); ServerState state = getLabel().getState(); if (!ServerState.STARTING.equals(state) && !state.isRunningState()) { throw new ServersViewException("Cannot stop server because it not running"); } operateServerState("Stop", ServerState.STOPPED); }
@Override public String description() { return "server's state is: " + expectedState.getText(); }
@Override public boolean test() { return expectedState.equals(getLabel().getState()); }