368
|
1 package alice.daemon;
|
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
|
4 import alice.datasegment.CommandType;
|
|
5 import alice.datasegment.Receiver;
|
|
6
|
|
7 public class MulticastIncrement extends CodeSegment {
|
|
8
|
419
|
9 public Receiver num = ids.create(CommandType.TAKE);
|
368
|
10
|
419
|
11 @Override
|
|
12 public void run() {
|
|
13 int num = this.num.asInteger();
|
|
14 System.out.println("[CodeSegment] " + num++);
|
|
15 if (num == 10) System.exit(0);
|
|
16 MulticastIncrement cs = new MulticastIncrement();
|
547
|
17 cs.num.setKey("multicast", "num", this);
|
419
|
18
|
|
19 ods.put("multicast", "num", num);
|
|
20
|
|
21 }
|
368
|
22
|
|
23 }
|