1 31 package org.objectweb.proactive.core.descriptor.data; 32 33 import org.objectweb.proactive.core.process.ExternalProcess; 34 35 36 45 public class VirtualMachineImpl implements VirtualMachine, java.io.Serializable { 46 50 51 private String name; 52 53 54 private String nodeNumber = "1"; 55 56 57 private String acquisitionMethod; 58 59 62 63 private transient ExternalProcess process; 64 65 66 private String creatorId = null; 67 68 72 75 VirtualMachineImpl() { 76 } 77 78 public void setHostsNumber(String nodeNumber) throws java.io.IOException { 82 if (new Integer (nodeNumber).intValue() < 1) { 83 throw new java.io.IOException ( 84 "Cannot define nodeNumber with a value < 1"); 85 } 86 this.nodeNumber = nodeNumber; 87 } 88 89 90 public String getNodeNumber() { 91 return this.nodeNumber; 92 } 93 94 public void setName(String s) { 95 name = s; 96 } 97 98 public String getName() { 99 return name; 100 } 101 102 110 111 119 public void setProcess(ExternalProcess p) { 120 process = p; 121 } 122 123 public ExternalProcess getProcess() { 124 return process; 125 } 126 127 132 public String getHostName() { 133 String hostName = process.getHostname(); 134 if (hostName == null) { 135 hostName = "localhost"; 136 } 137 return hostName; 138 } 139 140 public void setCreatorId(String creatorId) { 141 this.creatorId = creatorId; 142 } 143 144 public String getCreatorId() { 145 return this.creatorId; 146 } 147 } 148 | Popular Tags |