01: /*****************************************************************************
02: * Copyright (C) NanoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: * Original code by Aslak Hellesoy and Paul Hammant *
09: *****************************************************************************/package org.nanocontainer.testmodel;
10:
11: import junit.framework.Assert;
12: import org.picocontainer.Startable;
13:
14: public class WebServerImpl implements WebServer, Startable {
15:
16: public WebServerImpl(WebServerConfig wsc) {
17: this (wsc, new StringBuffer("d"));
18: }
19:
20: public WebServerImpl(WebServerConfig wsc, StringBuffer sb) {
21: Assert
22: .assertTrue("No port number specified",
23: wsc.getPort() > 0);
24: Assert.assertNotNull("No host name specified", wsc.getHost());
25: sb.append("-WebServerImpl:" + wsc.getHost() + ":"
26: + wsc.getPort());
27: }
28:
29: public void start() {
30: }
31:
32: public void stop() {
33: }
34: }
|