本文整理匯總了Java中org.apache.felix.cm.file.FilePersistenceManager類的典型用法代碼示例。如果您正苦於以下問題:Java FilePersistenceManager類的具體用法?Java FilePersistenceManager怎麽用?Java FilePersistenceManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FilePersistenceManager類屬於org.apache.felix.cm.file包,在下文中一共展示了FilePersistenceManager類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import org.apache.felix.cm.file.FilePersistenceManager; //導入依賴的package包/類
protected void setUp() throws Exception
{
super.setUp();
configLocation = new File( "target/config." + System.currentTimeMillis() );
persistenceManager = new FilePersistenceManager( configLocation.getAbsolutePath() );
bindingsFile = new File( configLocation, DynamicBindings.BINDINGS_FILE_NAME + ".config" );
}
示例2: ConfigurationAdminBackend
import org.apache.felix.cm.file.FilePersistenceManager; //導入依賴的package包/類
public ConfigurationAdminBackend(@Context BundleContext context,
@Requires ApplicationConfiguration configuration) {
if (!configuration.getBooleanWithDefault("configadmin.persistence", true)) {
return;
}
String loc = configuration.getWithDefault("configadmin.storage", LOCATION);
FilePersistenceManager delegate = new FilePersistenceManager(
new File(configuration.getBaseDir(), loc).getAbsolutePath());
reg = context.registerService(PersistenceManager.class, delegate, null);
}