annotate src/alice/test/topology/share/SendData.java @ 212:b5daccf36104 working

add Receiver state pattern
author one
date Wed, 27 Mar 2013 17:30:52 +0900
parents ae6ed9c35288
children fec0726bb126
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
147
ae6ed9c35288 change share test
sugi
parents:
diff changeset
1 package alice.test.topology.share;
ae6ed9c35288 change share test
sugi
parents:
diff changeset
2
ae6ed9c35288 change share test
sugi
parents:
diff changeset
3 import alice.codesegment.CodeSegment;
ae6ed9c35288 change share test
sugi
parents:
diff changeset
4 import alice.datasegment.CommandType;
ae6ed9c35288 change share test
sugi
parents:
diff changeset
5 import alice.datasegment.Receiver;
ae6ed9c35288 change share test
sugi
parents:
diff changeset
6
ae6ed9c35288 change share test
sugi
parents:
diff changeset
7 public class SendData extends CodeSegment{
ae6ed9c35288 change share test
sugi
parents:
diff changeset
8 private Receiver data = ids.create(CommandType.PEEK);
ae6ed9c35288 change share test
sugi
parents:
diff changeset
9
ae6ed9c35288 change share test
sugi
parents:
diff changeset
10 public SendData(int index){
ae6ed9c35288 change share test
sugi
parents:
diff changeset
11 this.data.setKey("local", "data", index);
ae6ed9c35288 change share test
sugi
parents:
diff changeset
12 }
ae6ed9c35288 change share test
sugi
parents:
diff changeset
13
ae6ed9c35288 change share test
sugi
parents:
diff changeset
14 @Override
ae6ed9c35288 change share test
sugi
parents:
diff changeset
15 public void run(){
212
b5daccf36104 add Receiver state pattern
one
parents: 147
diff changeset
16 new SendData(this.data.data.index);
b5daccf36104 add Receiver state pattern
one
parents: 147
diff changeset
17 ods.put("parent", "data", this.data.data.val);
147
ae6ed9c35288 change share test
sugi
parents:
diff changeset
18 }
ae6ed9c35288 change share test
sugi
parents:
diff changeset
19
ae6ed9c35288 change share test
sugi
parents:
diff changeset
20 }