Mercurial > hg > RemoteEditor > REPSessionManager
diff test/AutoSelectManager.java @ 391:3b0a5a55e3ee
24
author | one@firefly.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 10 Nov 2008 22:25:14 +0900 |
parents | |
children | 85d01cb6d133 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/AutoSelectManager.java Mon Nov 10 22:25:14 2008 +0900 @@ -0,0 +1,31 @@ +package test; + +import java.io.IOException; + +import rep.ServerMainLoop; +import rep.SessionManager; +import rep.handler.Editor; +import test.sematest.TestGUI; + +public class AutoSelectManager extends SessionManager { + + public static void main(String[] args) throws InterruptedException, IOException { + int port =ServerMainLoop.DEFAULT_PORT; + int port_s = ServerMainLoop.DEFAULT_PORT; + //System.setProperty("file.encoding", "UTF-8"); + if(args.length > 0){ + if (args.length!=2) { + logger.writeLog("Usage: sessionManager our_port parent_port"); + return; + } + port = Integer.parseInt(args[0]); + port_s = Integer.parseInt(args[1]); + } + Editor.noMergeMode = true; + SessionManager sm = new SessionManager(); + sm.setReceivePort(port); + sm.setParentPort(port_s); + // Ok start main loop + sm.init(port,new TestGUI(sm)); + } +}