Class PluginExtensionServiceTracker

java.lang.Object
com.xebialabs.xlrelease.osgi.spring.PluginExtensionServiceTracker
All Implemented Interfaces:
com.xebialabs.xlrelease.booter.osgi.OsgiServiceWhiteboard

@Component public class PluginExtensionServiceTracker extends Object implements com.xebialabs.xlrelease.booter.osgi.OsgiServiceWhiteboard
OSGi-service feeder for PluginExtensionRegistryImpl: a bundle that contributes a Declarative Services component (rather than a Spring plugin context, see PluginContextFactory) implementing one of HostExtensionPointCatalog's interfaces is discovered here and registered into the same registry, under the same Bundle-SymbolicName key, as any Spring-plugin-context extension.

Tracks a single ServiceTracker<Object, Object> filtered to the OR of every catalog entry's objectClass - a DS component's objectClass service property only ever contains the type(s) named in its own @Component(service = ...), never HostExtensionPoint itself, so the filter must enumerate concrete extension-point interfaces rather than track the marker type.

The two feeders (this one, and PluginContextFactory's Spring-plugin-context path) stay disjoint by construction: a Spring bean is never also an OSGi service, and a DS component never lives in a plugin's Spring child context, so a given extension is registered exactly once regardless of which authoring style its bundle used.

  • Constructor Details

  • Method Details

    • attach

      public void attach(org.osgi.framework.BundleContext context)
      Specified by:
      attach in interface com.xebialabs.xlrelease.booter.osgi.OsgiServiceWhiteboard
    • detach

      public void detach()
      Specified by:
      detach in interface com.xebialabs.xlrelease.booter.osgi.OsgiServiceWhiteboard