DelayedConfigHandler.java revision 88f2d7061bb42999901dcff81c37089b000d32e0
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions Copyrighted [year] [name of copyright owner]".
*
* Copyright © 2011 ForgeRock AS. All rights reserved.
*/
/**
* Handles configuration that needs to wait for related meta-data to become available
* (e.g. for encryption) before it can be provided to OSGi
*
* @author aegloff
*/
public class DelayedConfigHandler implements ProviderListener {
/**
* Add a configuration to the delayed pool
*
* @param config the configuration to handle when new meta-data becomes available
*/
}
/**
* Detects changed meta data providers
*/
if (configCrypto != null) {
try {
props = config.configCrypto.getPropertiesToEncrypt(config.pidOrFactory, config.factoryAlias, config.parsedConfig);
try {
// Meta data now found, handle it
config.configInstaller.setConfig(config.newConfig, new String[] {config.pidOrFactory, config.factoryAlias}, config.file);
logger.warn("Setting delayed configuration failed for {} {}", new Object[] {config.pidOrFactory, config.factoryAlias, ex});
}
} catch (WaitForMetaData ex) {
// Still not available for this config, leave it in delayed config
}
} else {
}
}
}
}