view src/alice/test/topology/aquarium/fx/RegistRoutingTable.java @ 1:b997f2ce1a04

add Controller Class
author one
date Sat, 26 Jan 2013 18:29:45 +0900
parents 6f44308ee519
children 4e5507afb41f
line wrap: on
line source

package alice.test.topology.aquarium.fx;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class RegistRoutingTable extends CodeSegment{

	private Receiver rdata = ids.create(CommandType.PEEK);
	private Receiver data = ids.create(CommandType.TAKE);
	
	public RegistRoutingTable(){
		rdata.setKey("list");
		data.setKey("member");
	}
	
	@Override
	public void run() {
		RoutingTable routing = rdata.asClass(RoutingTable.class);
		routing.table.add(new RoutingData(data.from));
		System.out.println(routing.toString());
		ods.update("local", "list", routing);
		new RegistRoutingTable();
		
		
	}

}