--- /dev/null
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JiHye Kim <jihyse424.kim@samsung.com>
+ * Minkee Lee <minkee.lee@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.vms;
+
+import org.tizen.emulator.manager.vms.helper.VMLauncherException;
+import org.tizen.emulator.manager.vms.helper.VMWorkerException;
+
+public interface IVMWorker {
+ public void sendRemoteLog(String msg);
+ public void initLauncher();
+
+ public void launchVM() throws VMLauncherException, VMWorkerException;
+ public void modifyVM(VMPropertyValue newVM) throws VMWorkerException;
+ public void createNewBaseImage(VMProperty property, String dest)
+ throws VMWorkerException;
+ public boolean deleteVM() throws VMWorkerException;
+ public void resetVM() throws VMWorkerException;
+ public void cloneVM(String newVMName) throws VMWorkerException;
+}
import org.tizen.emulator.manager.vms.helper.WorkerLock;
import org.tizen.emulator.manager.vms.option.IOption;
-public class VMWorkerCommon {
+public class VMWorkerCommon implements IVMWorker {
private VMProperty property;
private WorkerThread worker = null;
private String baseImagePath = null;
private ILauncher launcher;
private boolean isModified;
+ @Override
public void sendRemoteLog(String msg) {
-
}
+ @Override
public void initLauncher() {
-
}
protected void setLauncher(ILauncher launcher) {
return launcher;
}
-
public void setVMProperty(VMProperty property) {
this.property = property;
}
return baseImagePartPath;
}
+ @Override
public void launchVM() throws VMLauncherException, VMWorkerException {
launchVM(false, null);
}
}
}
+ @Override
public void modifyVM(VMPropertyValue newVM) throws VMWorkerException {
// lock.acquire
WorkerLock.acquire();
}
}
+ @Override
public void createNewBaseImage(VMProperty property, String dest)
throws VMWorkerException {
// lock.acuire
}
}
+ @Override
public boolean deleteVM() throws VMWorkerException {
boolean result = true;
return result;
}
+ @Override
public void resetVM() throws VMWorkerException {
// lock.acquire
WorkerLock.acquire();
}
}
+ @Override
public void cloneVM(String newVMName) throws VMWorkerException {
VMPropertyValue newValue = property.getPropertyValue();
newValue.vmsName = newVMName;