-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0aa45a2
commit 10b6c38
Showing
5 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 © <a href="mailto:[email protected]">Vadim Tkachenko</a> 2001-2021 | ||
* @author Copyright © <a href="mailto:[email protected]">Vadim Tkachenko</a> 2001-2024 | ||
*/ | ||
public class UnitObserver { | ||
|
||
|
@@ -33,6 +33,11 @@ public class UnitObserver { | |
private final Map<String, Signal<ZoneStatus, String>> zone2status = new TreeMap<>(); | ||
private Signal<HvacDeviceStatus, Void> unitStatus; | ||
|
||
/** | ||
* Feed terminators. | ||
* | ||
* VT: FIXME: Do we really need them? They have never been acted upon on shutdown. Consider removing. | ||
*/ | ||
private final Set<Disposable> 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(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,11 @@ | |
|
||
import java.util.Map; | ||
|
||
/** | ||
* Base class for HCC remote control endpoints. | ||
* | ||
* @author Copyright © <a href="mailto:[email protected]">Vadim Tkachenko 2001-2024 | ||
*/ | ||
public class Endpoint { | ||
|
||
protected final Logger logger = LogManager.getLogger(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 © <a href="mailto:[email protected]">Vadim Tkachenko 2001-2024 | ||
*/ | ||
public class HttpServer extends Endpoint { | ||
|
||
private static final DurationFormatter uptimeFormatter = new DurationFormatter(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 © <a href="mailto:[email protected]">Vadim Tkachenko 2001-2024 | ||
*/ | ||
public class RSocketServer extends Endpoint { | ||
|
||
public enum Command { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
/** | ||
* Web UI for Home Climate Control - reactive version. | ||
* | ||
* @author Copyright © <a href="mailto:[email protected]">Vadim Tkachenko</a> 2001-2023 | ||
* @author Copyright © <a href="mailto:[email protected]">Vadim Tkachenko</a> 2001-2024 | ||
*/ | ||
public class WebUI implements AutoCloseable { | ||
|
||
|