57
|
1 package fdl.test.transfer.cluster;
|
|
2
|
|
3 import java.io.IOException;
|
|
4
|
|
5 import fdl.FDLindaServ;
|
|
6 import fdl.MetaLinda;
|
|
7
|
|
8
|
|
9 public class FDLServWithSend extends FDLindaServ {
|
|
10 public FDLServWithSend(int port) throws IOException {
|
|
11 super(port);
|
|
12 }
|
|
13
|
|
14 private static String host = "localhost";
|
|
15
|
|
16 @Override public void mainLoop() {
|
|
17 System.out.println("change mainloop");
|
|
18 MetaLinda ml = new MetaLinda(tupleSpace, this);
|
|
19 mpe = new MetaProtocolEngine(ml, host);
|
|
20 mpe.mainLoop();
|
|
21 }
|
|
22
|
|
23 public static void main(String[] args){
|
|
24 for (int i=0; i<args.length; ++i) {
|
|
25 if("-send".equals(args[i])){
|
|
26 host = args[++i];
|
|
27 } else {
|
|
28 System.err.println("引数指定の誤り:未知の引数が指定されました");
|
|
29 }
|
|
30 }
|
|
31 try {
|
|
32 FDLServWithSend serv;
|
|
33 serv = new FDLServWithSend(10000);
|
|
34 serv.mainLoop();
|
|
35 } catch (IOException e) {
|
|
36 e.printStackTrace();
|
|
37 }
|
|
38 }
|
|
39
|
|
40 }
|