269
|
1 package alice.topology.manager.reconnection;
|
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
|
4 import alice.datasegment.CommandType;
|
|
5 import alice.datasegment.DataSegment;
|
|
6 import alice.datasegment.Receiver;
|
|
7 import alice.topology.HostMessage;
|
|
8
|
|
9 public class ReceiveReconnectData extends CodeSegment{
|
|
10 private Receiver hostData = ids.create(CommandType.TAKE);
|
|
11
|
|
12 public ReceiveReconnectData(){
|
|
13 hostData.setKey("_RECODATA");
|
|
14 }
|
|
15
|
|
16 @Override
|
|
17 public void run() {
|
|
18 System.out.println("ReceiveReconnectData");
|
|
19 HostMessage host = hostData.asClass(HostMessage.class);
|
|
20 DataSegment.remove(host.connectionName);
|
|
21 DataSegment.connect(host.connectionName, host.reverseName, host.name, host.port);
|
270
|
22 ods.put(host.connectionName, "reverseKey", host.reverseName);
|
269
|
23 new ReceiveReconnectData();
|
|
24 }
|
|
25
|
|
26
|
|
27 }
|