Package org.apache.karaf.config.core
Class MetaServiceCaller
- java.lang.Object
-
- org.apache.karaf.config.core.MetaServiceCaller
-
public class MetaServiceCaller extends Object
Allows to use the MetaTypeService as an optional dependency
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetaServiceCaller.MetaInfo
-
Constructor Summary
Constructors Constructor Description MetaServiceCaller()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TdoWithMetaType(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 searchstatic List<String>getPidsWithMetaInfo(org.osgi.framework.BundleContext context)static <T> TwithMetaTypeService(org.osgi.framework.BundleContext context, Function<org.osgi.service.metatype.MetaTypeService,T> callable)
-
-
-
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
-
-