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 474496ec2ac318ae4c8d57ca27c6b5896e1bcd5f..40e519b3a9204b2b9d95a7d86aefbb1e6e17860c 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."); }