/** * Remove a bundle from our potential mailcap pool. * * @param bundle The potential source bundle. */ protected void unregisterBundle(Bundle bundle) { URL mailcap = mailCaps.remove(bundle.getBundleId()); if (mailcap != null ){ log(LogService.LOG_DEBUG, "removing mailcap at " + mailcap); rebuildCommandMap(); } }
@Override public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) { log(LogService.LOG_DEBUG, "Bundle Considered for mailcap providers: " + bundle.getSymbolicName()); // this will update for the new bundle registerBundle(bundle); }
@Override public void removedBundle(Bundle bundle, BundleEvent event, Object object) { unregisterBundle(bundle); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new CommandMapBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
/** * Handle the activation of a new bundle. * * @param bundle The source bundle. * @param event The bundle event information. * * @return A return object. */ @Override public Object addingBundle(Bundle bundle, BundleEvent event) { if (bundle.equals(activationBundle)) { return null; } return registerBundle(bundle); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new CommandMapBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
/** * Handle the activation of a new bundle. * * @param bundle The source bundle. * @param event The bundle event information. * * @return A return object. */ @Override public Object addingBundle(Bundle bundle, BundleEvent event) { if (bundle.equals(activationBundle)) { return null; } return registerBundle(bundle); }
/** * Remove a bundle from our potential mailcap pool. * * @param bundle The potential source bundle. */ protected void unregisterBundle(Bundle bundle) { URL mailcap = mailCaps.remove(bundle.getBundleId()); if (mailcap != null ){ log(LogService.LOG_DEBUG, "removing mailcap at " + mailcap); rebuildCommandMap(); } }
@Override public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) { log(LogService.LOG_DEBUG, "Bundle Considered for mailcap providers: " + bundle.getSymbolicName()); // this will update for the new bundle registerBundle(bundle); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new CommandMapBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
@Override public void removedBundle(Bundle bundle, BundleEvent event, Object object) { unregisterBundle(bundle); }
/** * Handle the activation of a new bundle. * * @param bundle The source bundle. * @param event The bundle event information. * * @return A return object. */ @Override public Object addingBundle(Bundle bundle, BundleEvent event) { if (bundle.equals(activationBundle)) { return null; } return registerBundle(bundle); }
/** * Remove a bundle from our potential mailcap pool. * * @param bundle The potential source bundle. */ protected void unregisterBundle(Bundle bundle) { URL mailcap = mailCaps.remove(bundle.getBundleId()); if (mailcap != null ){ log(LogService.LOG_DEBUG, "removing mailcap at " + mailcap); rebuildCommandMap(); } }
@Override public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) { log(LogService.LOG_DEBUG, "Bundle Considered for mailcap providers: " + bundle.getSymbolicName()); // this will update for the new bundle registerBundle(bundle); }
@Override public void removedBundle(Bundle bundle, BundleEvent event, Object object) { unregisterBundle(bundle); }
/** * Perform the check for an existing mailcap file when * a bundle is registered. * * @param bundle The potential provider bundle. * * @return A URL object if this bundle contains a mailcap file. */ private Object registerBundle(Bundle bundle) { URL url = bundle.getResource("/META-INF/mailcap"); if (url != null) { log(LogService.LOG_DEBUG, "found mailcap at " + url); mailCaps.put(bundle.getBundleId(), url); rebuildCommandMap(); } // the url marks our interest in additional activity for this // bundle. return url; }
/** * Perform the check for an existing mailcap file when * a bundle is registered. * * @param bundle The potential provider bundle. * * @return A URL object if this bundle contains a mailcap file. */ private Object registerBundle(Bundle bundle) { URL url = bundle.getResource("/META-INF/mailcap"); if (url != null) { log(LogService.LOG_DEBUG, "found mailcap at " + url); mailCaps.put(bundle.getBundleId(), url); rebuildCommandMap(); } // the url marks our interest in additional activity for this // bundle. return url; }
/** * Perform the check for an existing mailcap file when * a bundle is registered. * * @param bundle The potential provider bundle. * * @return A URL object if this bundle contains a mailcap file. */ private Object registerBundle(Bundle bundle) { URL url = bundle.getResource("/META-INF/mailcap"); if (url != null) { log(LogService.LOG_DEBUG, "found mailcap at " + url); mailCaps.put(bundle.getBundleId(), url); rebuildCommandMap(); } // the url marks our interest in additional activity for this // bundle. return url; }