view src/alice/topology/manager/reconnection/ReceiveReconnectData.java @ 269:9982e1c4f099

debugging reconnectManager
author sugi
date Tue, 20 Aug 2013 17:35:03 +0900
parents
children 23e53aaa8720
line wrap: on
line source

package alice.topology.manager.reconnection;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.DataSegment;
import alice.datasegment.Receiver;
import alice.topology.HostMessage;

public class ReceiveReconnectData extends CodeSegment{
	private Receiver hostData = ids.create(CommandType.TAKE);

	public ReceiveReconnectData(){
		hostData.setKey("_RECODATA");
	}
	
	@Override
	public void run() {
		System.out.println("ReceiveReconnectData");
		HostMessage host = hostData.asClass(HostMessage.class);
		DataSegment.remove(host.connectionName);
		DataSegment.connect(host.connectionName, host.reverseName, host.name, host.port);
		
		new ReceiveReconnectData();
	}
	

}