Search in sources :

Example 1 with FeatureURLHandler

use of org.apache.karaf.deployer.features.FeatureURLHandler 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);
}
Also used : FeatureDeploymentListener(org.apache.karaf.deployer.features.FeatureDeploymentListener) FeatureURLHandler(org.apache.karaf.deployer.features.FeatureURLHandler) Hashtable(java.util.Hashtable) FeaturesService(org.apache.karaf.features.FeaturesService)

Aggregations

Hashtable (java.util.Hashtable)1 FeatureDeploymentListener (org.apache.karaf.deployer.features.FeatureDeploymentListener)1 FeatureURLHandler (org.apache.karaf.deployer.features.FeatureURLHandler)1 FeaturesService (org.apache.karaf.features.FeaturesService)1