рефакторинг нити планировщика двм тестов на сервере.
This commit is contained in:
@@ -2,6 +2,9 @@ package TestingSystem.DVM.DVMPackage;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.User.User;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
@@ -21,6 +24,10 @@ public class DVMPackage extends TestingPackage {
|
||||
public DVMPackage_json package_json = null;
|
||||
//---
|
||||
@Override
|
||||
public void destructor() {
|
||||
package_json = null;
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
DVMPackage tasksPackage = (DVMPackage) src;
|
||||
@@ -41,4 +48,13 @@ public class DVMPackage extends TestingPackage {
|
||||
public void saveJson() throws Exception {
|
||||
Utils.jsonToFile(package_json, getJsonFile());
|
||||
}
|
||||
public void readJson() throws Exception {
|
||||
package_json = (DVMPackage_json) Utils.jsonFromFile(getJsonFile(), DVMPackage_json.class);
|
||||
}
|
||||
public Machine getMachine(){
|
||||
return new Machine(machine_name,machine_address,machine_port,MachineType.Server);
|
||||
}
|
||||
public User getUser(){
|
||||
return new User(user_name, user_password, user_workspace);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user