annotate src/alice/test/topology/aquarium/fx/RegistRoutingTable.java @ 1:b997f2ce1a04

add Controller Class
author one
date Sat, 26 Jan 2013 18:29:45 +0900
parents 6f44308ee519
children 4e5507afb41f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
1 package alice.test.topology.aquarium.fx;
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
2
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
3 import alice.codesegment.CodeSegment;
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
4 import alice.datasegment.CommandType;
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
5 import alice.datasegment.Receiver;
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
6
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
7 public class RegistRoutingTable extends CodeSegment{
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
8
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
9 private Receiver rdata = ids.create(CommandType.PEEK);
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
10 private Receiver data = ids.create(CommandType.TAKE);
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
11
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
12 public RegistRoutingTable(){
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
13 rdata.setKey("list");
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
14 data.setKey("member");
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
15 }
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
16
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
17 @Override
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
18 public void run() {
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
19 RoutingTable routing = rdata.asClass(RoutingTable.class);
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
20 routing.table.add(new RoutingData(data.from));
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
21 System.out.println(routing.toString());
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
22 ods.update("local", "list", routing);
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
23 new RegistRoutingTable();
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
24
1
b997f2ce1a04 add Controller Class
one
parents: 0
diff changeset
25
0
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
26 }
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
27
6f44308ee519 aquarium with javafx
YU
parents:
diff changeset
28 }