Package org.soulwing.s2ks
Class KeyStorageLocator
- java.lang.Object
-
- org.soulwing.s2ks.KeyStorageLocator
-
public final class KeyStorageLocator extends java.lang.ObjectA service locator forKeyStorage.- Author:
- Carl Harris
-
-
Constructor Summary
Constructors Constructor Description KeyStorageLocator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyStoragegetInstance(java.lang.String provider, java.util.Properties properties)Gets a new key storage instance from the specified provider.static KeyStoragegetInstance(java.lang.String provider, java.util.Properties properties, java.util.function.Supplier<java.util.ServiceLoader<KeyStorageProvider>> loader)Gets a new key storage instance from the specified provider.static MutableKeyStoragegetMutableInstance(java.lang.String provider, java.util.Properties properties)Gets a new mutable key storage instance from the specified provider.static MutableKeyStoragegetMutableInstance(java.lang.String provider, java.util.Properties properties, java.util.function.Supplier<java.util.ServiceLoader<KeyStorageProvider>> loader)Gets a new mutable key storage instance from the specified provider.
-
-
-
Method Detail
-
getInstance
public static KeyStorage getInstance(java.lang.String provider, java.util.Properties properties) throws NoSuchProviderException, ProviderConfigurationException
Gets a new key storage instance from the specified provider.- Parameters:
provider- provider name; e.g.LOCALproperties- provider-defined configuration properties- Returns:
- key storage instance
- Throws:
NoSuchProviderException- if there exists no provider with the given nameProviderConfigurationException- if the provider reports an error in creating and configuring the storage instance
-
getInstance
public static KeyStorage getInstance(java.lang.String provider, java.util.Properties properties, java.util.function.Supplier<java.util.ServiceLoader<KeyStorageProvider>> loader) throws NoSuchProviderException, ProviderConfigurationException
Gets a new key storage instance from the specified provider.- Parameters:
loader- a supplier for a service loaderprovider- provider name; e.g.LOCALproperties- provider-defined configuration properties- Returns:
- key storage instance
- Throws:
NoSuchProviderException- if there exists no provider with the given nameProviderConfigurationException- if the provider reports an error in creating and configuring the storage instance
-
getMutableInstance
public static MutableKeyStorage getMutableInstance(java.lang.String provider, java.util.Properties properties) throws NoSuchProviderException, ProviderConfigurationException
Gets a new mutable key storage instance from the specified provider.- Parameters:
provider- provider name; e.g.LOCALproperties- provider-defined configuration properties- Returns:
- key storage instance
- Throws:
NoSuchProviderException- if there exists no provider with the given name that supports the mutable interfaceProviderConfigurationException- if the provider reports an error in creating and configuring the storage instance
-
getMutableInstance
public static MutableKeyStorage getMutableInstance(java.lang.String provider, java.util.Properties properties, java.util.function.Supplier<java.util.ServiceLoader<KeyStorageProvider>> loader) throws NoSuchProviderException, ProviderConfigurationException
Gets a new mutable key storage instance from the specified provider.- Parameters:
loader- a supplier for a service loaderprovider- provider name; e.g.LOCALproperties- provider-defined configuration properties- Returns:
- key storage instance
- Throws:
NoSuchProviderException- if there exists no provider with the given name that supports the mutable interfaceProviderConfigurationException- if the provider reports an error in creating and configuring the storage instance
-
-