Interface CryptoProvider.Session
- Enclosing interface:
CryptoProvider
public static interface CryptoProvider.Session
-
Method Summary
Modifier and TypeMethodDescriptionReturns theCryptoProviders
instance that created this session.<T> T
getStateValue
(CryptoProvider cryptoProvider, Supplier<T> stateFactory) Retrieves a state object from the sessionvoid
setStateValue
(CryptoProvider cryptoProvider, Object value) Saves a state object into the session using the cryptoprovider's identity as the key
-
Method Details
-
setStateValue
Saves a state object into the session using the cryptoprovider's identity as the key- Parameters:
cryptoProvider
- the instance storing the valuevalue
- the value to store
-
getStateValue
Retrieves a state object from the session- Type Parameters:
T
- the type of the state object- Parameters:
cryptoProvider
- the CryptoProvider instancestateFactory
- supplier that will create a new instance of the requested state object if not present in the session- Returns:
- state object (either previously saved or newly created by the factory supplier)
-
getCryptoProviders
CryptoProviders getCryptoProviders()Returns theCryptoProviders
instance that created this session.- Returns:
- the
CryptoProviders
instance that created this session
-