public Bundle findAndStopBundle(String bsn) throws BundleException { Bundle bundle = findBundle(bsn); if (bundle != null) { bundle.stop(); } return bundle; } }
@Override public MetaTypeInformationDTO getMetaTypeInformation(String bundleSymbolicName) { try { Bundle bundle = bundleUtils.findBundle(bundleSymbolicName); return getMetaTypeInformationDTO(bundle); } catch (BundleException e) { LOG.info("Could not find bundle '" + bundleSymbolicName + "'"); return null; } }
private void startBundles(CreateEnsembleOptions options) throws BundleException { BundleUtils bundleUtils = new BundleUtils(bundleContext); Bundle agentBundle = bundleUtils.findBundle("io.fabric8.fabric-agent"); if (agentBundle != null && options.isAgentEnabled()) { agentBundle.start(); } // Bundle webBundle = bundleUtils.findBundle("org.ops4j.pax.web.pax-web-jetty"); // if (webBundle != null) { // webBundle.start(); // } }
public void installBundles() throws BundleException { BundleUtils bundleUtils = new BundleUtils(bundleContext); Bundle bundleFabricCommands = bundleUtils.findBundle("io.fabric8.fabric-commands"); if (bundleFabricCommands == null) { bundleFabricCommands = bundleUtils.installBundle("mvn:io.fabric8/fabric-commands/" + FabricConstants.FABRIC_VERSION); } bundleFabricCommands.start(); Bundle bundleFabricAgent = bundleUtils.findBundle("io.fabric8.fabric-agent"); if (nonManaged && bundleFabricAgent == null) { //do nothing } else if (nonManaged && bundleFabricAgent != null) { bundleFabricAgent.stop(); } else if (bundleFabricAgent == null) { bundleFabricAgent = bundleUtils.installBundle("mvn:io.fabric8/fabric-agent/" + FabricConstants.FABRIC_VERSION); bundleFabricAgent.start(); } else { bundleFabricAgent.start(); } }
public void installBundles() throws BundleException { BundleUtils bundleUtils = new BundleUtils(bundleContext); Bundle bundleFabricCommands = bundleUtils.findBundle("io.fabric8.fabric-commands"); if (bundleFabricCommands == null) { bundleFabricCommands = bundleUtils.installBundle("mvn:io.fabric8/fabric-commands/" + FabricConstants.FABRIC_VERSION); } bundleFabricCommands.start(); Bundle bundleFabricAgent = bundleUtils.findBundle("io.fabric8.fabric-agent"); if (nonManaged && bundleFabricAgent == null) { //do nothing } else if (nonManaged && bundleFabricAgent != null) { bundleFabricAgent.stop(); } else if (bundleFabricAgent == null) { bundleFabricAgent = bundleUtils.installBundle("mvn:io.fabric8/fabric-agent/" + FabricConstants.FABRIC_VERSION); bundleFabricAgent.start(); } else { bundleFabricAgent.start(); } }
Bundle fileinstall = new BundleUtils(bundleContext).findBundle("org.apache.felix.fileinstall"); if (fileinstall != null) { fileinstall.stop(Bundle.STOP_TRANSIENT);