391
|
1 package test;
|
|
2
|
|
3 import java.io.IOException;
|
|
4
|
|
5 import rep.ServerMainLoop;
|
|
6 import rep.SessionManager;
|
|
7 import rep.handler.Editor;
|
|
8 import test.sematest.TestGUI;
|
|
9
|
|
10 public class AutoSelectManager extends SessionManager {
|
|
11
|
|
12 public static void main(String[] args) throws InterruptedException, IOException {
|
|
13 int port =ServerMainLoop.DEFAULT_PORT;
|
|
14 int port_s = ServerMainLoop.DEFAULT_PORT;
|
|
15 //System.setProperty("file.encoding", "UTF-8");
|
|
16 if(args.length > 0){
|
|
17 if (args.length!=2) {
|
|
18 logger.writeLog("Usage: sessionManager our_port parent_port");
|
|
19 return;
|
|
20 }
|
|
21 port = Integer.parseInt(args[0]);
|
|
22 port_s = Integer.parseInt(args[1]);
|
|
23 }
|
420
|
24 Editor.noMergeMode = false;
|
391
|
25 SessionManager sm = new SessionManager();
|
|
26 sm.setReceivePort(port);
|
|
27 sm.setParentPort(port_s);
|
|
28 // Ok start main loop
|
|
29 sm.init(port,new TestGUI(sm));
|
|
30 }
|
|
31 }
|