1 22 package org.jboss.ant.taskdefs.server; 23 24 import org.apache.tools.ant.BuildException; 25 import org.apache.tools.ant.Task; 26 import org.jboss.test.util.server.Server; 27 import org.jboss.test.util.server.ServerManager; 28 29 35 public class ConfigManagerTask extends Task 36 { 37 38 protected static final String MANAGER_REF = "serverManager"; 39 40 ServerManager manager = null; 41 42 47 public ConfigManagerTask() 48 { 49 manager = new ServerManager(); 50 } 51 52 55 public void execute() throws BuildException 56 { 57 if (getProject().getReference(MANAGER_REF) == null) 58 { 59 getProject().addReference(MANAGER_REF, manager); 60 } 61 } 62 63 68 public void addServer(Server server) 69 { 70 manager.addServer(server); 71 } 72 73 77 public void setJavaHome(String javaHome) 78 { 79 manager.setJavaHome(javaHome); 80 } 81 82 86 public void setJbossHome(String jbossHome) 87 { 88 manager.setJbossHome(jbossHome); 89 } 90 91 95 public void setJvm(String jvm) 96 { 97 manager.setJvm(jvm); 98 } 99 100 106 public void setUdpGroup(String udpGroup) 107 { 108 manager.setUdpGroup(udpGroup); 109 } 110 } | Popular Tags |