Package software.amazon.awssdk.crt.io
Enum Pkcs11Lib.InitializeFinalizeBehavior
java.lang.Object
java.lang.Enum<Pkcs11Lib.InitializeFinalizeBehavior>
software.amazon.awssdk.crt.io.Pkcs11Lib.InitializeFinalizeBehavior
- All Implemented Interfaces:
Serializable,Comparable<Pkcs11Lib.InitializeFinalizeBehavior>
- Enclosing class:
- Pkcs11Lib
public static enum Pkcs11Lib.InitializeFinalizeBehavior
extends Enum<Pkcs11Lib.InitializeFinalizeBehavior>
Controls how Pkcs11Lib calls
C_Initialize() and C_Finalize()
on the PKCS#11 library.-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static Pkcs11Lib.InitializeFinalizeBehavior[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Default behavior that accommodates most use cases.C_Initialize()is called on creation, and "already-initialized" errors are ignored.C_Finalize()is never called, just in case another part of your application is still using the PKCS#11 library. -
OMIT
Skip callingC_Initialize()andC_Finalize(). Use this if your application has already initialized the PKCS#11 library, and you do not wantC_Initialize()called again. -
STRICT
C_Initialize()is called on creation andC_Finalize()is called on cleanup. IfC_Initialize()reports that's it's already initialized, this is treated as an error. Use this if you need perfect cleanup (ex: running valgrind with --leak-check).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-