@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); }
private void registerHideHook() { if (reg == null) { reg = context.registerService(new String[] { FindHook.class.getName(), EventListenerHook.class.getName() }, this, null); } }