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 enum
SdkSession creation error -
Method Summary
Modifier and TypeMethodDescriptiongetError()
Retrieves the error information associated with the initialization of the SDK session.Retrieves the SDK session.boolean
Checks if the SDK session initialization was successful.
-
Method Details
-
isSuccessful
public boolean isSuccessful()Checks if the SDK session initialization was successful.- Returns:
true
if the initialization was successful,false
otherwise.
-
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
SdkSession
if 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.Errors
representing the error details, or null if no error occurred during initialization.
-