Search in sources :

Example 1 with ConfigurationSecretEncrypterFactory

use of org.apache.qpid.server.plugin.ConfigurationSecretEncrypterFactory in project qpid-broker-j by apache.

the class AbstractContainer method updateEncrypter.

private void updateEncrypter(final String encryptionProviderType) {
    if (encryptionProviderType != null && !"".equals(encryptionProviderType.trim())) {
        PluggableFactoryLoader<ConfigurationSecretEncrypterFactory> factoryLoader = new PluggableFactoryLoader<>(ConfigurationSecretEncrypterFactory.class);
        ConfigurationSecretEncrypterFactory factory = factoryLoader.get(encryptionProviderType);
        if (factory == null) {
            throw new IllegalConfigurationException("Unknown Configuration Secret Encryption method " + encryptionProviderType);
        }
        setEncrypter(factory.createEncrypter(this));
    } else {
        setEncrypter(null);
    }
}
Also used : IllegalConfigurationException(org.apache.qpid.server.configuration.IllegalConfigurationException) ConfigurationSecretEncrypterFactory(org.apache.qpid.server.plugin.ConfigurationSecretEncrypterFactory) PluggableFactoryLoader(org.apache.qpid.server.plugin.PluggableFactoryLoader)

Aggregations

IllegalConfigurationException (org.apache.qpid.server.configuration.IllegalConfigurationException)1 ConfigurationSecretEncrypterFactory (org.apache.qpid.server.plugin.ConfigurationSecretEncrypterFactory)1 PluggableFactoryLoader (org.apache.qpid.server.plugin.PluggableFactoryLoader)1