Java Code Examples for org.apache.felix.fileinstall.ArtifactUrlTransformer

The following examples show how to use org.apache.felix.fileinstall.ArtifactUrlTransformer. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: activiti6-boot2   Source File: Activator.java    License: Apache License 2.0 5 votes vote down vote up
public void start(BundleContext context) throws Exception {
  callbacks.add(new Service(context, URLStreamHandlerService.class.getName(), new BpmnURLHandler(), props("url.handler.protocol", "bpmn")));
  callbacks.add(new Service(context, URLStreamHandlerService.class.getName(), new BarURLHandler(), props("url.handler.protocol", "bar")));
  try {
    callbacks.add(new Service(context, new String[] { ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName() }, new BpmnDeploymentListener(), null));
    callbacks.add(new Service(context, new String[] { ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName() }, new BarDeploymentListener(), null));
  } catch (NoClassDefFoundError e) {
    LOGGER.warn("FileInstall package is not available, disabling fileinstall support");
    LOGGER.debug("FileInstall package is not available, disabling fileinstall support", e);
  }
  callbacks.add(new Tracker(new Extender(context)));
}
 
Example 2
Source Project: flowable-engine   Source File: Activator.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void start(BundleContext context) throws Exception {
    callbacks.add(new Service(context, URLStreamHandlerService.class.getName(), new BpmnURLHandler(), props("url.handler.protocol", "bpmn")));
    callbacks.add(new Service(context, URLStreamHandlerService.class.getName(), new BarURLHandler(), props("url.handler.protocol", "bar")));
    try {
        callbacks.add(new Service(context, new String[]{ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName()}, new BpmnDeploymentListener(), null));
        callbacks.add(new Service(context, new String[]{ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName()}, new BarDeploymentListener(), null));
    } catch (NoClassDefFoundError e) {
        LOGGER.warn("FileInstall package is not available, disabling fileinstall support");
        LOGGER.debug("FileInstall package is not available, disabling fileinstall support", e);
    }
    callbacks.add(new Tracker(new Extender(context)));
}
 
Example 3
Source Project: camunda-bpm-platform-osgi   Source File: Activator.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void init(BundleContext context, DependencyManager manager) throws Exception {
  manager.add(createComponent().setInterface(new String[] { ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName() }, null)
      .setImplementation(BpmnDeploymentListener.class));
  manager.add(createComponent().setInterface(URLStreamHandlerService.class.getName(),
      new Hashtable<String, String>(Collections.singletonMap("url.handler.protocol", "bpmn"))).setImplementation(BpmnURLHandler.class));
}