Package com.digimarc.dms.session
Class SdkSessionInitializationResult
java.lang.Object
com.digimarc.dms.session.SdkSessionInitializationResult
Encapsulates a SdkSession creation outcome with a value of type SdkSession or a error with an arbitrary error of type SdkSessionInitializationResult.Errors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSdkSession creation error -
Method Summary
Modifier and TypeMethodDescriptiongetError()Retrieves the error information associated with the initialization of the SDK session.Retrieves the SDK session.booleanChecks if the SDK session initialization was successful.
-
Method Details
-
isSuccessful
public boolean isSuccessful()Checks if the SDK session initialization was successful.- Returns:
trueif the initialization was successful,falseotherwise.
-
getSessionOrThrow
Retrieves the SDK session. This method returns the result of the SDK session creation operation or throws RuntimeException if the session creation failed.- Returns:
- The current
SdkSessionif available, or throw RuntimeException - Throws:
RuntimeException- if an error occurred during session construction
-
getError
Retrieves the error information associated with the initialization of the SDK session.- Returns:
- An value of
SdkSessionInitializationResult.Errorsrepresenting the error details, or null if no error occurred during initialization.
-