/**
* Returns a reference to the <em>best matching</em> service for the given classes and OSGi filter.
*
* @param bundleContext OSGi bundle context
* @param classes array of fully qualified class names
* @param filter valid OSGi filter (can be <code>null</code>)
* @return reference to the <em>best matching</em> service
*/
public static ServiceReference getServiceReference(BundleContext bundleContext, String[] classes, String filter) {
// use #getServiceReference(BundleContext, String, String) method to
// speed the service lookup process by
// giving one class as a hint to the OSGi implementation
String clazz = (ObjectUtils.isEmpty(classes) ? null : classes[0]);
return getServiceReference(bundleContext, clazz, OsgiFilterUtils.unifyFilter(classes, filter));
}
OsgiServiceReferenceUtils.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:gemini.blueprint
作者:
评论列表
文章目录