1 10 11 package org.nanocontainer.testmodel; 12 13 import junit.framework.Assert; 14 import org.picocontainer.Startable; 15 16 public class WebServerImpl implements WebServer, Startable { 17 18 public WebServerImpl(WebServerConfig wsc) { 19 this(wsc, new StringBuffer ("d")); 20 } 21 22 public WebServerImpl(WebServerConfig wsc, StringBuffer sb) { 23 Assert.assertTrue("No port number specified", wsc.getPort() > 0); 24 Assert.assertNotNull("No host name specified", wsc.getHost()); 25 sb.append("-WebServerImpl:" + wsc.getHost() + ":" + wsc.getPort()); 26 } 27 28 public void start() { 29 } 30 31 public void stop() { 32 } 33 } 34 | Popular Tags |