热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.osgi.framework.hooks.service.FindHook类的使用及代码示例

本文整理了Java中org.osgi.framework.hooks.service.FindHook类的一些代码示例,展示了FindHook

本文整理了Java中org.osgi.framework.hooks.service.FindHook类的一些代码示例,展示了FindHook类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FindHook类的具体详情如下:
包路径:org.osgi.framework.hooks.service.FindHook
类名称:FindHook

FindHook介绍

[英]OSGi Framework Service Find Hook Service.

Bundles registering this service will be called during framework service find (get service references) operations.
[中]OSGi框架服务查找钩子服务。
在框架服务查找(获取服务引用)操作期间,将调用注册此服务的捆绑包。

代码示例

代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: com.github.veithen.cosmos/cosmos-equinox

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: org.eclipse/osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: org.eclipse/org.eclipse.osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi

public void call(Object hook, ServiceRegistration hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}

代码示例来源:origin: apache/felix

public void invokeServiceFindHook(
org.osgi.framework.hooks.service.FindHook fh,
BundleContext context, String name, String filter,
boolean allServices, Collection> references)
throws Exception
{
if (System.getSecurityManager() != null)
{
Actions actiOns= (Actions) m_actions.get();
actions.set(
Actions.INVOKE_SERVICE_FIND_HOOK, fh, context, name, filter,
(allServices) ? Boolean.TRUE : Boolean.FALSE, references);
try
{
AccessController.doPrivileged(actions, m_acc);
}
catch (PrivilegedActionException e)
{
throw e.getException();
}
}
else
{
fh.find(context, name, filter, allServices, references);
}
}

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

for (int i = 0; i ((FindHook) findHooks.get(i)).find(
bundle.getBundleContext(),
className,

代码示例来源:origin: apache/felix

return null;
case INVOKE_SERVICE_FIND_HOOK:
((org.osgi.framework.hooks.service.FindHook) arg1).find(
(BundleContext) arg2, (String) arg3, (String) arg4,
((Boolean) arg5).booleanValue(),

代码示例来源:origin: apache/felix

fh.find(this,
className,
expr,

代码示例来源:origin: org.apache.felix/org.apache.felix.connect

fh.find(this,
className,
expr,

代码示例来源:origin: org.knopflerfish/framework

/**
*
*/
void filterServiceReferences(BundleContextImpl bc,
String service,
String filter,
boolean allServices,
Collection> refs)
{
@SuppressWarnings({ "unchecked", "rawtypes" })
final List> srl
= (List) fwCtx.services.get(FindHook.class.getName());
if (srl != null) {
final RemoveOnlyCollection> filtered
= new RemoveOnlyCollection>(refs);
for (final ServiceRegistrationImpl fhr : srl) {
final ServiceReferenceImpl sr = fhr.reference;
final FindHook fh = sr.getService(fwCtx.systemBundle);
if (fh != null) {
try {
fh.find(bc, service, filter, allServices, filtered);
} catch (final Exception e) {
fwCtx.frameworkError(bc,
new BundleException("Failed to call find hook #" +
sr.getProperty(Constants.SERVICE_ID), e));
}
}
}
}
}

推荐阅读
  • 本文介绍了如何在Azure应用服务实例上获取.NetCore 3.0+的支持。作者分享了自己在将代码升级为使用.NET Core 3.0时遇到的问题,并提供了解决方法。文章还介绍了在部署过程中使用Kudu构建的方法,并指出了可能出现的错误。此外,还介绍了开发者应用服务计划和免费产品应用服务计划在不同地区的运行情况。最后,文章指出了当前的.NET SDK不支持目标为.NET Core 3.0的问题,并提供了解决方案。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 目录实现效果:实现环境实现方法一:基本思路主要代码JavaScript代码总结方法二主要代码总结方法三基本思路主要代码JavaScriptHTML总结实 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 标题: ... [详细]
  • 闭包一直是Java社区中争论不断的话题,很多语言都支持闭包这个语言特性,闭包定义了一个依赖于外部环境的自由变量的函数,这个函数能够访问外部环境的变量。本文以JavaScript的一个闭包为例,介绍了闭包的定义和特性。 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • intellij idea的安装与使用(保姆级教程)
    intellijidea的安装与使用(保姆级教程)IntelliJ在业界被公认为最好的java开发工具,尤其在智能代码助手、代码自动提示、重构、JavaEE支持、各类版本工具(gi ... [详细]
  • Android中高级面试必知必会,积累总结
    本文介绍了Android中高级面试的必知必会内容,并总结了相关经验。文章指出,如今的Android市场对开发人员的要求更高,需要更专业的人才。同时,文章还给出了针对Android岗位的职责和要求,并提供了简历突出的建议。 ... [详细]
  • 本文介绍了Java工具类库Hutool,该工具包封装了对文件、流、加密解密、转码、正则、线程、XML等JDK方法的封装,并提供了各种Util工具类。同时,还介绍了Hutool的组件,包括动态代理、布隆过滤、缓存、定时任务等功能。该工具包可以简化Java代码,提高开发效率。 ... [详细]
  • android listview OnItemClickListener失效原因
    最近在做listview时发现OnItemClickListener失效的问题,经过查找发现是因为button的原因。不仅listitem中存在button会影响OnItemClickListener事件的失效,还会导致单击后listview每个item的背景改变,使得item中的所有有关焦点的事件都失效。本文给出了一个范例来说明这种情况,并提供了解决方法。 ... [详细]
  • 如何使用Java获取服务器硬件信息和磁盘负载率
    本文介绍了使用Java编程语言获取服务器硬件信息和磁盘负载率的方法。首先在远程服务器上搭建一个支持服务端语言的HTTP服务,并获取服务器的磁盘信息,并将结果输出。然后在本地使用JS编写一个AJAX脚本,远程请求服务端的程序,得到结果并展示给用户。其中还介绍了如何提取硬盘序列号的方法。 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
author-avatar
徐韦志弘宇靖宏
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有