KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > echoserver > EchoServer


1 /*
2  * This file is part of the QuickServer library
3  * Copyright (C) QuickServer.org
4  *
5  * Use, modification, copying and distribution of this software is subject to
6  * the terms and conditions of the GNU Lesser General Public License.
7  * You should have received a copy of the GNU LGP License along with this
8  * library; if not, you can download a copy from <http://www.quickserver.org/>.
9  *
10  * For questions, suggestions, bug-reports, enhancement-requests etc.
11  * visit http://www.quickserver.org
12  *
13  */

14
15 package echoserver;
16
17 import org.quickserver.net.*;
18 import org.quickserver.net.server.*;
19
20 import java.io.*;
21 import java.util.logging.*;
22 import org.quickserver.util.logging.*;
23
24 public class EchoServer {
25     public static String JavaDoc version = "1.3";
26
27     public static void main(String JavaDoc s[]) {
28         QuickServer echoServer;
29         String JavaDoc confFile = "conf"+File.separator+"EchoServer.xml";
30
31         try {
32             echoServer = QuickServer.load(confFile);
33         } catch(AppException e) {
34             System.out.println("Error in server : "+e);
35             e.printStackTrace();
36         }
37     }
38
39     /*
40     public static void main(String s[]) {
41         QuickServer echoServer = new QuickServer();
42         
43         String confFile = "conf"+File.separator+"EchoServer.xml";
44         Object config[] = new Object[] {confFile};
45         
46         try {
47             if(echoServer.initServer(config) == true) {
48                 echoServer.startServer();
49                 echoServer.startQSAdminServer();
50             }
51         } catch(AppException e) {
52             System.out.println("Error in server : "+e);
53             e.printStackTrace();
54         }
55     }*/

56 }
57
58
59
Popular Tags