Mercurial > hg > FederatedLinda
diff src/fdl/test/transfer/cluster/FDLServWithSend.java @ 57:48bb577a313f
Protocol Engine for cluster
author | axmo |
---|---|
date | Thu, 12 Feb 2009 14:42:27 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/fdl/test/transfer/cluster/FDLServWithSend.java Thu Feb 12 14:42:27 2009 +0900 @@ -0,0 +1,40 @@ +package fdl.test.transfer.cluster; + +import java.io.IOException; + +import fdl.FDLindaServ; +import fdl.MetaLinda; + + +public class FDLServWithSend extends FDLindaServ { + public FDLServWithSend(int port) throws IOException { + super(port); + } + + private static String host = "localhost"; + + @Override public void mainLoop() { + System.out.println("change mainloop"); + MetaLinda ml = new MetaLinda(tupleSpace, this); + mpe = new MetaProtocolEngine(ml, host); + mpe.mainLoop(); + } + + public static void main(String[] args){ + for (int i=0; i<args.length; ++i) { + if("-send".equals(args[i])){ + host = args[++i]; + } else { + System.err.println("引数指定の誤り:未知の引数が指定されました"); + } + } + try { + FDLServWithSend serv; + serv = new FDLServWithSend(10000); + serv.mainLoop(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +}