Mercurial > hg > RemoteEditor > REPSessionManager
view test/AutoSelectManager.java @ 484:7420dea70dd7
Direct Merge first try
author | one |
---|---|
date | Wed, 20 Oct 2010 21:19:24 +0900 |
parents | 5c95a9020e31 |
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)); } }