Class MetaServiceCaller


  • public class MetaServiceCaller
    extends Object
    Allows to use the MetaTypeService as an optional dependency
    • Constructor Detail

      • MetaServiceCaller

        public MetaServiceCaller()
    • Method Detail

      • withMetaTypeService

        public static <T> T withMetaTypeService​(org.osgi.framework.BundleContext context,
                                                Function<org.osgi.service.metatype.MetaTypeService,​T> callable)
      • getPidsWithMetaInfo

        public static List<String> getPidsWithMetaInfo​(org.osgi.framework.BundleContext context)
      • doWithMetaType

        public static <T> T doWithMetaType​(org.osgi.framework.BundleContext context,
                                           String pid,
                                           Function<Optional<MetaServiceCaller.MetaInfo>,​T> function)
        Attempts to find MetaType information for the specified PID and invokes the supplied callback with the result of the search