Skip to content

Commit e6880ae

Browse files
committed
Merge branch 'develop' into feature/listlane-fixes
1 parent 10f2f9d commit e6880ae

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

server/src/main/java/swim/tutorial/DataSource.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package swim.tutorial;
22

3+
import swim.api.downlink.ListDownlink;
34
import swim.api.ref.SwimRef;
45
import swim.structure.Record;
6+
import swim.structure.Value;
57

68
/**
79
* Simple wrapper around some {@code SwimRef}, e.g. a {@code SwimClient} handle,
@@ -17,14 +19,16 @@ class DataSource {
1719
this.hostUri = hostUri;
1820
}
1921

20-
void generate() throws InterruptedException {
22+
void sendCommands() throws InterruptedException {
2123
int indicator = 0;
2224
while (true) {
2325
int foo = (int) (Math.random() * 10 - 5) + 30;
2426
int bar = (int) (Math.random() * 20 - 10) + 60;
2527
int baz = (int) (Math.random() * 30 - 15) + 90;
2628
if ((indicator / 25) % 2 == 0) {
27-
foo *= 2; bar *= 2; baz *= 2;
29+
foo *= 2;
30+
bar *= 2;
31+
baz *= 2;
2832
}
2933
// msg's Recon serialization will take the following form:
3034
// "{foo:$foo,bar:$bar,baz:$baz}"

server/src/main/java/swim/tutorial/TutorialPlane.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static void main(String[] args) throws IOException, InterruptedException
2525
// be done in external processes instead
2626
final ClientRuntime client = new ClientRuntime();
2727
client.start();
28-
new DataSource(client, "swim://localhost:9001").generate();
28+
final DataSource ds = new DataSource(client, "warp://localhost:9001");
29+
ds.sendCommands();
2930
}
3031
}

0 commit comments

Comments
 (0)