1 package hudson.model; 2 3 import hudson.Launcher; 4 import hudson.FilePath; 5 import hudson.util.EnumConverter; 6 import org.apache.commons.beanutils.ConvertUtils; 7 8 13 public interface Node { 14 20 String getNodeName(); 21 22 25 String getNodeDescription(); 26 27 30 Launcher createLauncher(TaskListener listener); 31 32 38 int getNumExecutors(); 39 40 45 Mode getMode(); 46 47 Computer createComputer(); 48 49 56 FilePath getWorkspaceFor(TopLevelItem item); 57 58 public enum Mode { 59 NORMAL("Utilize this slave as much as possible"), 60 EXCLUSIVE("Leave this machine for tied jobs only"); 61 62 private final String description; 63 64 public String getDescription() { 65 return description; 66 } 67 68 public String getName() { 69 return name(); 70 } 71 72 Mode(String description) { 73 this.description = description; 74 } 75 76 static { 77 ConvertUtils.register(new EnumConverter(),Mode.class); 78 } 79 } 80 } 81 | Popular Tags |