1 5 package com.tc.test.server.appserver.tomcat5x; 6 7 import com.tc.test.TestConfigObject; 8 import com.tc.test.server.appserver.AppServer; 9 import com.tc.test.server.appserver.AppServerInstallation; 10 import com.tc.test.server.appserver.AppServerParameters; 11 import com.tc.test.server.appserver.NewAppServerFactory; 12 import com.tc.test.server.appserver.war.DtdWar; 13 import com.tc.test.server.appserver.war.War; 14 import com.tc.test.server.tcconfig.StandardTerracottaAppServerConfig; 15 16 import java.io.File ; 17 import java.net.URL ; 18 import java.util.Properties ; 19 20 24 public final class Tomcat5xAppServerFactory extends NewAppServerFactory { 25 26 public Tomcat5xAppServerFactory(ProtectedKey protectedKey, TestConfigObject config) { 28 super(protectedKey, config); 29 } 30 31 public AppServerParameters createParameters(String instanceName, Properties props) { 32 return new Tomcat5xAppServerParameters(instanceName, props, config.sessionClasspath()); 33 } 34 35 public AppServer createAppServer(AppServerInstallation installation) { 36 return new Tomcat5xAppServer((Tomcat5xAppServerInstallation) installation); 37 } 38 39 public AppServerInstallation createInstallation(URL host, File serverDir, File workingDir) throws Exception { 40 return new Tomcat5xAppServerInstallation(host, serverDir, workingDir, config.appserverMajorVersion(), config 41 .appserverMinorVersion()); 42 } 43 44 public AppServerInstallation createInstallation(File home, File workingDir) throws Exception { 45 return new Tomcat5xAppServerInstallation(home, workingDir, config.appserverMajorVersion(), config 46 .appserverMinorVersion()); 47 } 48 49 public War createWar(String appName) { 50 return new DtdWar(appName); 51 } 52 53 public StandardTerracottaAppServerConfig createTcConfig(File baseDir) { 54 return new Tomcat5xAppServerConfig(baseDir); 55 } 56 } 57 | Popular Tags |