From db30f634967b4d9521a7fbae216ad93d0d873f8d Mon Sep 17 00:00:00 2001 From: aleigh Date: Sun, 29 May 2022 16:52:26 -0700 Subject: [PATCH] atg-84: Support zero configuration for historian --- lc-esp-sdk/src/main/java/lc/esp/sdk/ESPClient.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lc-esp-sdk/src/main/java/lc/esp/sdk/ESPClient.java b/lc-esp-sdk/src/main/java/lc/esp/sdk/ESPClient.java index 474496ec2..40e519b3a 100644 --- a/lc-esp-sdk/src/main/java/lc/esp/sdk/ESPClient.java +++ b/lc-esp-sdk/src/main/java/lc/esp/sdk/ESPClient.java @@ -38,7 +38,15 @@ public class ESPClient implements AutoCloseable { public ESPClient() throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException { UniversalJob.banner(logger, "Enhanced Services Platform/SDK mk18 (GIPSY DANGER)"); + } + /** + * Returns the ESPClient's {@link ZeroClient} to the caller. The caller can use this to determine other + * application-specific service configuration. If start() has not been called, this method + * will return null. + */ + public ZeroClient getZero() { + return zero; } public ESPClient start() throws Exception { @@ -51,6 +59,7 @@ public class ESPClient implements AutoCloseable { } ZeroServiceConfig espCfg = zai.readConfig(SVC_ESP); + if (espCfg == null) { throw new IllegalStateException("No service configuration found in ZERO."); } -- GitLab