org.apache.logging.log4j.core.net.ssl
Class KeyStoreConfiguration

java.lang.Object
  extended by org.apache.logging.log4j.core.net.ssl.StoreConfiguration<KeyStore>
      extended by org.apache.logging.log4j.core.net.ssl.AbstractKeyStoreConfiguration
          extended by org.apache.logging.log4j.core.net.ssl.KeyStoreConfiguration

@Plugin(name="KeyStore",
        category="Core",
        printObject=true)
public class KeyStoreConfiguration
extends AbstractKeyStoreConfiguration

Configuration of the KeyStore


Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.net.ssl.StoreConfiguration
LOGGER
 
Constructor Summary
KeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm)
           
 
Method Summary
static KeyStoreConfiguration createKeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm)
          Creates a KeyStoreConfiguration.
 KeyManagerFactory initKeyManagerFactory()
           
 
Methods inherited from class org.apache.logging.log4j.core.net.ssl.AbstractKeyStoreConfiguration
getKeyStore, load
 
Methods inherited from class org.apache.logging.log4j.core.net.ssl.StoreConfiguration
equals, getLocation, getPassword, getPasswordAsCharArray, hashCode, setLocation, setPassword
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreConfiguration

public KeyStoreConfiguration(String location,
                             String password,
                             String keyStoreType,
                             String keyManagerFactoryAlgorithm)
                      throws StoreConfigurationException
Throws:
StoreConfigurationException
Method Detail

createKeyStoreConfiguration

@PluginFactory
public static KeyStoreConfiguration createKeyStoreConfiguration(@PluginAttribute(value="location")
                                                                              String location,
                                                                              @PluginAttribute(value="password")
                                                                              String password,
                                                                              @PluginAttribute(value="type")
                                                                              String keyStoreType,
                                                                              @PluginAttribute(value="keyManagerFactoryAlgorithm")
                                                                              String keyManagerFactoryAlgorithm)
                                                         throws StoreConfigurationException
Creates a KeyStoreConfiguration.

Parameters:
location - The location of the KeyStore.
password - The password to access the KeyStore.
keyStoreType - The KeyStore type, null defaults to "JKS".
keyManagerFactoryAlgorithm - TODO
Returns:
a new KeyStoreConfiguration
Throws:
StoreConfigurationException

initKeyManagerFactory

public KeyManagerFactory initKeyManagerFactory()
                                        throws NoSuchAlgorithmException,
                                               UnrecoverableKeyException,
                                               KeyStoreException
Throws:
NoSuchAlgorithmException
UnrecoverableKeyException
KeyStoreException


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.