@Override
public void start(BundleContext context) {
aspecio = new AspecioImpl(context);
aspecio.activate();
boolean filterServices = shouldFilterServices(context);
if (filterServices) {
context.registerService(new String[] { Aspecio.class.getName(), FindHook.class.getName(), EventListenerHook.class.getName() },
aspecio, null);
} else {
context.registerService(Aspecio.class, aspecio, null);
}
Hashtable<String, Object> props = new Hashtable<>();
props.put("osgi.command.scope", AspecioGogoCommand.ASPECIO_GOGO_COMMAND_SCOPE);
props.put("osgi.command.function", AspecioGogoCommand.ASPECIO_GOGO_COMMANDS);
AspecioGogoCommand gogoCommand = new AspecioGogoCommand(context, aspecio);
context.registerService(Object.class, gogoCommand, props);
}
java类org.osgi.framework.hooks.service.EventListenerHook的实例源码
AspecioActivator.java 文件源码
项目:aspecio
阅读 37
收藏 0
点赞 0
评论 0
ServiceHideManager.java 文件源码
项目:openeos
阅读 26
收藏 0
点赞 0
评论 0
private void registerHideHook() {
if (reg == null) {
reg = context.registerService(new String[] { FindHook.class.getName(), EventListenerHook.class.getName() }, this, null);
}
}