View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
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 org.kuali.rice.ksb.server;
17  
18  import org.apache.log4j.Logger;
19  import org.eclipse.jetty.server.Server;
20  import org.eclipse.jetty.webapp.WebAppContext;
21  import org.kuali.rice.core.api.config.property.ConfigContext;
22  import org.kuali.rice.ksb.BaseTestServer;
23  
24  public class TestClient1 extends BaseTestServer {
25  	
26  	private static final Logger LOG = Logger.getLogger(TestClient1.class);
27  
28  	private static final String CONTEXT = "/TestClient1";
29  	
30  	@Override
31  	protected Server createServer() {
32  		Server server = new Server(new Integer(ConfigContext.getCurrentContextConfig().getProperty("ksb.client1.port")));
33  		String location = ConfigContext.getCurrentContextConfig().getProperty("client1.location");
34  		LOG.debug("#####################################");
35  		LOG.debug("#");
36  		LOG.debug("#  Starting Client1 using location " + location);
37  		LOG.debug("#");
38  		LOG.debug("#####################################");
39  		WebAppContext context = new WebAppContext(location, CONTEXT);	
40  		server.setHandler(context);
41  		return server;
42  	}
43  }