org.apache.hadoop.crypto.key
Class KeyProviderFactory

java.lang.Object
  extended by 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.


Field Summary
static String KEY_PROVIDER_PATH
           
 
Constructor Summary
KeyProviderFactory()
           
 
Method Summary
abstract  KeyProvider createProvider(URI providerName, Configuration conf)
           
static KeyProvider get(URI uri, Configuration conf)
          Create a KeyProvider based on a provided URI.
static List<KeyProvider> getProviders(Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_PROVIDER_PATH

public static final String KEY_PROVIDER_PATH
See Also:
Constant Field Values
Constructor Detail

KeyProviderFactory

public KeyProviderFactory()
Method Detail

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 URI
conf - 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.