diff src/alice/topology/node/Start.java @ 35:ac3b48c5f4da

share width each other with tree
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Fri, 20 Jan 2012 04:00:12 +0900
parents
children ae24d5d40c10
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/topology/node/Start.java	Fri Jan 20 04:00:12 2012 +0900
@@ -0,0 +1,32 @@
+package alice.topology.node;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class Start extends CodeSegment {
+	
+	public Receiver done = ids.create(CommandType.PEEK);
+	
+	private Class<? extends CodeSegment> clazz;
+	
+	public Start(Class<? extends CodeSegment> clazz) {
+		this.clazz = clazz;
+	}
+	
+	@Override
+	public void run() {
+		System.out.println("Start!");
+		if (clazz == null)
+			return;
+		try {
+			clazz.newInstance().execute();
+		} catch (InstantiationException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		}
+
+	}
+
+}