Reactive changes for samples

- Relates #750
This commit is contained in:
Janne Valkealahti
2019-05-11 09:26:13 +01:00
parent 7932545ea9
commit 64779f4039
22 changed files with 208 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,13 +54,13 @@ public class AbstractStateMachineCommands<S, E> implements CommandMarker {
@CliCommand(value = "sm start", help = "Start a state machine")
public String start() {
stateMachine.start();
stateMachine.startReactively().subscribe();
return "State machine started";
}
@CliCommand(value = "sm stop", help = "Stop a state machine")
public String stop() {
stateMachine.stop();
stateMachine.stopReactively().subscribe();
return "State machine stopped";
}