added run() method for Slipway
authoradam <adam@megacz.com>
Mon, 12 Feb 2007 09:39:33 +0000 (10:39 +0100)
committeradam <adam@megacz.com>
Mon, 12 Feb 2007 09:39:33 +0000 (10:39 +0100)
src/edu/berkeley/fleet/slipway/Slipway.java

index a161a02..5989d5f 100644 (file)
@@ -32,6 +32,12 @@ public class Slipway extends Interpreter {
         createShip("Dcache",  "dcache2");
     }
 
+    public FleetProcess run(final byte[] instructions) {
+        try {
+            return new Client(instructions);
+        } catch (IOException e) { throw new RuntimeException(e); }
+    }
+
     public void dumpFabric(boolean quiet) {
         // FIXME: this is really ugly: the order of port declarations in
         //        the XXXShip.java file must match the order in the .balsa file!
@@ -277,4 +283,5 @@ public class Slipway extends Interpreter {
     private static String getUniqueName(Ship ship) {
         return ship.getType() + ship.getOrdinal();
     }
+
 }
\ No newline at end of file