From 10b6c3811a16eaedd795fe90b205ef6faa45ad3e Mon Sep 17 00:00:00 2001 From: Vadim Tkachenko Date: Sun, 1 Sep 2024 19:05:03 -0700 Subject: [PATCH] Documentation update (#323, #324) --- .../java/net/sf/dz3r/view/UnitObserver.java | 17 +++++++---------- .../net/sf/dz3r/view/webui/v2/Endpoint.java | 5 +++++ .../net/sf/dz3r/view/webui/v2/HttpServer.java | 7 +++++++ .../sf/dz3r/view/webui/v2/RSocketServer.java | 7 +++++++ .../java/net/sf/dz3r/view/webui/v2/WebUI.java | 2 +- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/modules/hcc-director/src/main/java/net/sf/dz3r/view/UnitObserver.java b/modules/hcc-director/src/main/java/net/sf/dz3r/view/UnitObserver.java index 7181e3b8f..5cbdd9bb5 100644 --- a/modules/hcc-director/src/main/java/net/sf/dz3r/view/UnitObserver.java +++ b/modules/hcc-director/src/main/java/net/sf/dz3r/view/UnitObserver.java @@ -19,9 +19,9 @@ import java.util.TreeMap; /** - * Keeps track on the state of everything connected to a given {@link net.sf.dz3r.model.UnitDirector}. + * Keeps track on the state of everything connected to a given {@link UnitDirector}. * - * @author Copyright © Vadim Tkachenko 2001-2021 + * @author Copyright © Vadim Tkachenko 2001-2024 */ public class UnitObserver { @@ -33,6 +33,11 @@ public class UnitObserver { private final Map> zone2status = new TreeMap<>(); private Signal unitStatus; + /** + * Feed terminators. + * + * VT: FIXME: Do we really need them? They have never been acted upon on shutdown. Consider removing. + */ private final Set terminators = new LinkedHashSet<>(); public UnitObserver(UnitDirector source) { @@ -82,16 +87,8 @@ private void init() { logger.info("Observer feeds: {} initialized", terminators.size()); - // VT: FIXME: How do I wait until everything is done? - } finally { -// Flux.fromIterable(terminators) -// .doOnNext(Disposable::dispose) -// .subscribe() -// .dispose(); -// -// logger.info("Observer feeds: disposed of"); ThreadContext.pop(); } } diff --git a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/Endpoint.java b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/Endpoint.java index 8ddeb78f9..174d6c741 100644 --- a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/Endpoint.java +++ b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/Endpoint.java @@ -9,6 +9,11 @@ import java.util.Map; +/** + * Base class for HCC remote control endpoints. + * + * @author Copyright © Vadim Tkachenko 2001-2024 + */ public class Endpoint { protected final Logger logger = LogManager.getLogger(); diff --git a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/HttpServer.java b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/HttpServer.java index be160daf1..e30c7395b 100644 --- a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/HttpServer.java +++ b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/HttpServer.java @@ -31,6 +31,13 @@ import static org.springframework.web.reactive.function.server.ServerResponse.ok; +/** + * HCC remote control endpoint over HTTP. + * + * This endpoint only serves small snapshots. + * + * @author Copyright © Vadim Tkachenko 2001-2024 + */ public class HttpServer extends Endpoint { private static final DurationFormatter uptimeFormatter = new DurationFormatter(); diff --git a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/RSocketServer.java b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/RSocketServer.java index 22f9b9c51..dddbf3de2 100644 --- a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/RSocketServer.java +++ b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/RSocketServer.java @@ -19,6 +19,13 @@ import java.util.ArrayList; import java.util.Map; +/** + * HCC remote control endpoint over RSocket. + * + * This endpoint only serves streams, and big snapshots. + * + * @author Copyright © Vadim Tkachenko 2001-2024 + */ public class RSocketServer extends Endpoint { public enum Command { diff --git a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/WebUI.java b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/WebUI.java index 50c37211a..0ecc4353a 100644 --- a/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/WebUI.java +++ b/modules/hcc-webui/src/main/java/net/sf/dz3r/view/webui/v2/WebUI.java @@ -29,7 +29,7 @@ /** * Web UI for Home Climate Control - reactive version. * - * @author Copyright © Vadim Tkachenko 2001-2023 + * @author Copyright © Vadim Tkachenko 2001-2024 */ public class WebUI implements AutoCloseable {