Mercurial > hg > RemoteEditor > REPSessionManager
view test/AutoSelectManager.java @ 491:5945266c970d
before unMergedCmds fix , deadlockTimer API
author | one |
---|---|
date | Sat, 23 Oct 2010 12:34:46 +0900 |
parents | 7420dea70dd7 |
children |
line wrap: on
line source
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.mergeMode = Editor.MergeMode.Direct; SessionManager sm = new SessionManager(); sm.setReceivePort(port); sm.setParentPort(port_s); // Ok start main loop sm.init(port,new TestGUI(sm)); } }