/** * Constructs a new registry. */ public DefaultExtensionPointRegistry() { this.discovery = ServiceDiscovery.getInstance(); }
/** * Constructs a new registry. */ public DefaultExtensionPointRegistry() { this.discovery = ServiceDiscovery.getInstance(); }
public OSGiExtensionPointRegistry(BundleContext bundleContext) { super(ServiceDiscovery.getInstance(new EquinoxServiceDiscoverer(bundleContext))); this.bundleContext = bundleContext; }
public void stop(BundleContext context) throws Exception { ServiceDiscovery.getInstance().setServiceDiscoverer(null); if (discoverer != null) { discoverer.stop(); discoverer = null; } }
public void start(BundleContext context) throws Exception { discoverer = new EquinoxServiceDiscoverer(context); ServiceDiscovery.getInstance().setServiceDiscoverer(discoverer); // logger.info("Equinox-based service discoverer is now configured."); }
void initCommands() throws IOException { for (ServiceDeclaration sd : ServiceDiscovery.getInstance().getServiceDeclarations(Command.class)) { try { Class<?> c = Class.forName(sd.getClassName()); try { Command command = (Command)c.getConstructor(Shell.class).newInstance(this); commands.put(command.getName(), command); } catch (NoSuchMethodException e) { Command command = (Command)c.newInstance(); commands.put(command.getName(), command); } } catch (Exception e) { e.printStackTrace(); } } }
void initCommands() throws IOException { for (ServiceDeclaration sd : ServiceDiscovery.getInstance().getServiceDeclarations(Command.class)) { try { Class<?> c = Class.forName(sd.getClassName()); try { Command command = (Command)c.getConstructor(Shell.class).newInstance(this); commands.put(command.getName(), command); } catch (NoSuchMethodException e) { Command command = (Command)c.newInstance(); commands.put(command.getName(), command); } } catch (Exception e) { e.printStackTrace(); } } }
private static ClassLoader parentClassLoader(Contribution contribution) { if (contribution.getClassLoader() != null) { return contribution.getClassLoader(); } ClassLoader parentClassLoader = ServiceDiscovery.getInstance().getContextClassLoader(); return parentClassLoader; }
private static ClassLoader parentClassLoader(Contribution contribution) { if (contribution.getClassLoader() != null) { return contribution.getClassLoader(); } ClassLoader parentClassLoader = ServiceDiscovery.getInstance().getContextClassLoader(); return parentClassLoader; }
factory = (JavascriptProxyFactory) ServiceDiscovery.getInstance().getServiceDeclaration(bindingType); } catch (Exception e) { throw new IllegalArgumentException(e);
factoryDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(JavascriptProxyFactory.class); } catch (IOException e) { IllegalStateException ie = new IllegalStateException(e);