use of org.apache.karaf.deployer.features.FeatureDeploymentListener in project karaf by apache.
the class Activator method doStart.
@Override
protected void doStart() throws Exception {
FeaturesService service = getTrackedService(FeaturesService.class);
if (service == null) {
return;
}
Hashtable<String, Object> props = new Hashtable<>();
props.put("url.handler.protocol", "feature");
FeatureURLHandler handler = new FeatureURLHandler();
register(URLStreamHandlerService.class, handler, props);
listener = new FeatureDeploymentListener();
listener.setFeaturesService(service);
listener.setBundleContext(bundleContext);
listener.init();
register(new Class[] { ArtifactUrlTransformer.class, ArtifactListener.class }, listener);
}
Aggregations