コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
 /**
  * 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;
 }
コード例 #3
0
 /** Load libraries and DPU's jar files. */
 private void startUpLoad() {
   // first load libraries
   loadLibs(configuration.getDpuLibFolder());
 }
コード例 #4
0
 @Override
 public String getDPUDirectory() {
   return configuration.getDPUDirectory();
 }