01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse;
04:
05: import fitnesse.socketservice.SocketServer;
06: import java.net.*;
07:
08: public class FitNesseServer implements SocketServer {
09: private FitNesseContext context;
10:
11: public FitNesseServer(FitNesseContext context) {
12: this .context = context;
13: }
14:
15: public void serve(Socket s) {
16: serve(s, 10000);
17: }
18:
19: public void serve(Socket s, long requestTimeout) {
20: try {
21: FitNesseExpediter sender = new FitNesseExpediter(s, context);
22: sender.setRequestParsingTimeLimit(requestTimeout);
23: sender.start();
24: } catch (Exception e) {
25: e.printStackTrace();
26: }
27: }
28: }
|