001    /*****************************************************************************
002     * Copyright (C) NanoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     * Original code by Aslak Hellesoy and Paul Hammant                          *
009     *****************************************************************************/
010    
011    package org.nanocontainer.testmodel;
012    
013    import junit.framework.Assert;
014    import org.picocontainer.Startable;
015    
016    public class WebServerImpl implements WebServer, Startable {
017    
018        public WebServerImpl(WebServerConfig wsc) {
019            this(wsc, new StringBuffer("d"));
020        }
021    
022        public WebServerImpl(WebServerConfig wsc, StringBuffer sb) {
023            Assert.assertTrue("No port number specified", wsc.getPort() > 0);
024            Assert.assertNotNull("No host name specified", wsc.getHost());
025            sb.append("-WebServerImpl:" + wsc.getHost() + ":" + wsc.getPort());
026        }
027    
028        public void start() {
029        }
030    
031        public void stop() {
032        }
033    }