org.apache.hadoop.crypto.key
Class KeyProviderFactory
java.lang.Object
org.apache.hadoop.crypto.key.KeyProviderFactory
@InterfaceAudience.Public
@InterfaceStability.Unstable
public abstract class KeyProviderFactory
- extends Object
A factory to create a list of KeyProvider based on the path given in a
Configuration. It uses a service loader interface to find the available
KeyProviders and create them based on the list of URIs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_PROVIDER_PATH
public static final String KEY_PROVIDER_PATH
- See Also:
- Constant Field Values
KeyProviderFactory
public KeyProviderFactory()
createProvider
public abstract KeyProvider createProvider(URI providerName,
Configuration conf)
throws IOException
- Throws:
IOException
getProviders
public static List<KeyProvider> getProviders(Configuration conf)
throws IOException
- Throws:
IOException
get
public static KeyProvider get(URI uri,
Configuration conf)
throws IOException
- Create a KeyProvider based on a provided URI.
- Parameters:
uri
- key provider URIconf
- configuration to initialize the key provider
- Returns:
- the key provider for the specified URI, or
NULL
if
a provider for the specified URI scheme could not be found.
- Throws:
IOException
- thrown if the provider failed to initialize.
Copyright © 2014 Apache Software Foundation. All Rights Reserved.