Package com.senzing.sdk
Interface SzEnvironment
- All Known Implementing Classes:
SzCoreEnvironment
public interface SzEnvironment
Provides a factory interface for obtaining the references to the Senzing SDK
singleton instances that have been initialized.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroys thisSzEnvironment
and invalidates any SDK singleton references that has previously provided.long
Gets the currently active configuration ID for theSzEnvironment
.Provides a reference to theSzConfig
instance associated with thisSzEnvironment
.Provides a reference to theSzConfigManager
instance associated with thisSzEnvironment
.Provides a reference to theSzDiagnostic
instance associated with thisSzEnvironment
.Provides a reference to theSzEngine
instance associated with thisSzEnvironment
.Provides a reference to theSzProduct
instance associated with thisSzEnvironment
.boolean
Checks if this instance has had itsdestroy()
method called.void
reinitialize
(long configId) Reinitializes theSzEnvironment
with the specified configuration ID.
-
Method Details
-
getProduct
Provides a reference to theSzProduct
instance associated with thisSzEnvironment
.- Returns:
- The
SzProduct
instance associated with thisSzEnvironment
. - Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzProduct
instance.
-
getConfig
Provides a reference to theSzConfig
instance associated with thisSzEnvironment
.- Returns:
- The
SzProduct
instance associated with thisSzEnvironment
. - Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzConfig
instance.
-
getEngine
Provides a reference to theSzEngine
instance associated with thisSzEnvironment
.- Returns:
- The
SzEngine
instance associated with thisSzEnvironment
. - Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzEngine
instance.
-
getConfigManager
Provides a reference to theSzConfigManager
instance associated with thisSzEnvironment
.- Returns:
- The
SzConfigManager
instance associated with thisSzEnvironment
. - Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzConfigManager
instance.
-
getDiagnostic
Provides a reference to theSzDiagnostic
instance associated with thisSzEnvironment
.- Returns:
- The
SzDiagnostic
instance associated with thisSzEnvironment
. - Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzDiagnostic
instance.
-
getActiveConfigId
Gets the currently active configuration ID for theSzEnvironment
.- Returns:
- The currently active configuration ID.
- Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzDiagnostic
instance.
-
reinitialize
Reinitializes theSzEnvironment
with the specified configuration ID.- Parameters:
configId
- The configuraiton ID with which to initialize.- Throws:
IllegalStateException
- If thisSzEnvironment
instance has been destroyed.SzException
- If there was a failure in obtaining or initializing theSzDiagnostic
instance.
-
destroy
void destroy()Destroys thisSzEnvironment
and invalidates any SDK singleton references that has previously provided. If this instance has already been destroyed then this method has no effect. -
isDestroyed
boolean isDestroyed()Checks if this instance has had itsdestroy()
method called.- Returns:
true
if this instance has had itsdestroy()
method called, otherwisefalse
.
-