01: /*
02: * Copyright 2007 The Kuali Foundation
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package edu.iu.uis.eden.server;
17:
18: import java.util.HashMap;
19: import java.util.Map;
20:
21: import org.apache.log4j.Logger;
22: import org.kuali.rice.core.Core;
23: import org.kuali.rice.test.BaseTestServer;
24: import org.mortbay.jetty.Server;
25: import org.mortbay.jetty.webapp.WebAppContext;
26:
27: public class TestClient2 extends BaseTestServer {
28:
29: private static final Logger LOG = Logger
30: .getLogger(TestClient2.class);
31:
32: private static final String CONTEXT = "/TestClient2";
33:
34: /**
35: * If this property is set on the environment then it will use the keystore at the specified location as a custom keystore
36: */
37: public static final String CUSTOM_KEYSTORE = "CustomKeyStore";
38:
39: private static Map<String, Object> environment = new HashMap<String, Object>();
40:
41: @Override
42: protected Server createServer() {
43:
44: Server server = new Server(new Integer(Core
45: .getCurrentContextConfig().getProperty(
46: "ksb.client2.port")));
47: String location = Core.getCurrentContextConfig().getProperty(
48: "client2.location");
49: LOG.debug("#####################################");
50: LOG.debug("#");
51: LOG.debug("# Starting Client2 using location " + location);
52: LOG.debug("#");
53: LOG.debug("#####################################");
54: WebAppContext context = new WebAppContext(location, CONTEXT);
55: server.addHandler(context);
56: return server;
57: }
58:
59: public static Map<String, Object> getEnvironment() {
60: return environment;
61: }
62: }
|