/** * Create uri to given file in given directory in DPU's directory. * * @param directory * @param fileName * @return */ private String createUri(String directory, String fileName) { StringBuilder uri = new StringBuilder(); uri.append("file:///"); uri.append(configuration.getDPUDirectory()); uri.append(File.separator); uri.append(directory); uri.append(File.separator); uri.append(fileName); return uri.toString(); }
/** * Return configuration used to start up OSGi implementation. * * @return */ private java.util.Map<String, String> prepareSettings() { java.util.Map<String, String> config = new java.util.HashMap<>(); config.put("osgi.console", ""); config.put("osgi.clean", "true"); config.put("osgi.noShutdown", "true"); // export packages config.put( org.osgi.framework.Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, configuration.getPackagesToExpose()); return config; }
/** Load libraries and DPU's jar files. */ private void startUpLoad() { // first load libraries loadLibs(configuration.getDpuLibFolder()); }
@Override public String getDPUDirectory() { return configuration.getDPUDirectory(); }