01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.test.server.appserver.was6x;
06:
07: import com.tc.test.TestConfigObject;
08: import com.tc.test.server.appserver.AppServer;
09: import com.tc.test.server.appserver.AppServerFactory;
10: import com.tc.test.server.appserver.AppServerInstallation;
11: import com.tc.test.server.appserver.AppServerParameters;
12: import com.tc.test.server.appserver.StandardAppServerParameters;
13:
14: import java.io.File;
15: import java.util.Properties;
16:
17: /**
18: * This class creates specific implementations of return values for the given methods. To obtain an instance you must
19: * call {@link NewAppServerFactory.createFactoryFromProperties()}.
20: */
21: public final class Was6xAppServerFactory extends AppServerFactory {
22:
23: // This class may only be instantiated by its parent which contains the ProtectedKey
24: public Was6xAppServerFactory(ProtectedKey protectedKey,
25: TestConfigObject config) {
26: super (protectedKey, config);
27: }
28:
29: public AppServerParameters createParameters(String instanceName,
30: Properties props) {
31: return new StandardAppServerParameters(instanceName, props);
32: }
33:
34: public AppServer createAppServer(AppServerInstallation installation) {
35: return new Was6xAppServer(
36: (Was6xAppServerInstallation) installation);
37: }
38:
39: public AppServerInstallation createInstallation(File home,
40: File workingDir) throws Exception {
41: return new Was6xAppServerInstallation(home, workingDir, config
42: .appserverMajorVersion(), config
43: .appserverMinorVersion());
44: }
45: }
|