0
|
1 package alice.test.topology.aquarium.fx;
|
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
|
4 import alice.datasegment.CommandType;
|
|
5 import alice.datasegment.Receiver;
|
|
6
|
|
7 public class RegistRoutingTable extends CodeSegment{
|
|
8
|
|
9 private Receiver rdata = ids.create(CommandType.PEEK);
|
|
10 private Receiver data = ids.create(CommandType.TAKE);
|
|
11
|
|
12 public RegistRoutingTable(){
|
|
13 rdata.setKey("list");
|
|
14 data.setKey("member");
|
|
15 }
|
|
16
|
|
17 @Override
|
|
18 public void run() {
|
|
19 RoutingTable routing = rdata.asClass(RoutingTable.class);
|
|
20 routing.table.add(new RoutingData(data.from));
|
|
21 ods.update("local", "list", routing);
|
|
22 new RegistRoutingTable();
|
|
23
|
|
24 }
|
|
25
|
|
26 }
|