model: Remove confusing uses of completion chaining
This looks like the builder pattern, but isn't. Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
@@ -95,24 +95,21 @@ public class Tunnel extends BaseObservable implements Keyed<String> {
|
||||
return CompletableFuture.completedFuture(statistics);
|
||||
}
|
||||
|
||||
Config onConfigChanged(final Config config) {
|
||||
void onConfigChanged(final Config config) {
|
||||
this.config = config;
|
||||
notifyPropertyChanged(BR.config);
|
||||
return config;
|
||||
}
|
||||
|
||||
State onStateChanged(final State state) {
|
||||
void onStateChanged(final State state) {
|
||||
if (state != State.UP)
|
||||
onStatisticsChanged(null);
|
||||
this.state = state;
|
||||
notifyPropertyChanged(BR.state);
|
||||
return state;
|
||||
}
|
||||
|
||||
Statistics onStatisticsChanged(final Statistics statistics) {
|
||||
void onStatisticsChanged(final Statistics statistics) {
|
||||
this.statistics = statistics;
|
||||
notifyPropertyChanged(BR.statistics);
|
||||
return statistics;
|
||||
}
|
||||
|
||||
public CompletionStage<Config> setConfig(@NonNull final Config config) {
|
||||
|
||||
Reference in New Issue
Block a user