public static NodeFactory newInstance(Properties configProperties) { NodeFactory nodeFactory = null; try { Class<?> factoryClass = getFactoryImplClass(); nodeFactory = (NodeFactory)factoryClass.newInstance(); nodeFactory.properties = configProperties; nodeFactory.configure(new HashMap<String, Map<String,String>>()); } catch (Exception e) { throw new ServiceRuntimeException(e); } factories.add(nodeFactory); return nodeFactory; }
public static NodeFactory newInstance(Map<String, Map<String, String>> attributes) { NodeFactory nodeFactory = null; try { Class<?> factoryClass = getFactoryImplClass(); nodeFactory = (NodeFactory)factoryClass.newInstance(); nodeFactory.configure(attributes); } catch (Exception e) { throw new ServiceRuntimeException(e); } factories.add(nodeFactory); return nodeFactory; }
public static NodeFactory newInstance(Map<String, Map<String, String>> attributes) { NodeFactory nodeFactory = null; try { Class<?> factoryClass = getFactoryImplClass(); nodeFactory = (NodeFactory)factoryClass.newInstance(); nodeFactory.configure(attributes); } catch (Exception e) { throw new ServiceRuntimeException(e); } factories.add(nodeFactory); return nodeFactory; }
public static NodeFactory newInstance(Properties configProperties) { NodeFactory nodeFactory = null; try { Class<?> factoryClass = getFactoryImplClass(); nodeFactory = (NodeFactory)factoryClass.newInstance(); nodeFactory.properties = configProperties; nodeFactory.configure(new HashMap<String, Map<String,String>>()); } catch (Exception e) { throw new ServiceRuntimeException(e); } factories.add(nodeFactory); return nodeFactory; }
@Override public void configure(Map<String, Map<String, String>> attributes) { ServiceDiscovery discovery = getExtensionPointRegistry().getServiceDiscovery(); for (Map.Entry<String, Map<String, String>> e : attributes.entrySet()) { discovery.setAttribute(e.getKey(), e.getValue()); } for (Object o : properties.keySet()) { String p = (String) o; if (p.indexOf('.') > -1) { String serviceType = p.substring(0, p.lastIndexOf('.')); String attribute = p.substring(p.lastIndexOf('.')+1); discovery.setAttribute(serviceType, attribute, properties.getProperty(p)); } } quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING)); super.configure(attributes); }
@Override public void configure(Map<String, Map<String, String>> attributes) { ServiceDiscovery discovery = getExtensionPointRegistry().getServiceDiscovery(); for (Map.Entry<String, Map<String, String>> e : attributes.entrySet()) { discovery.setAttribute(e.getKey(), e.getValue()); } for (Object o : properties.keySet()) { String p = (String) o; if (p.indexOf('.') > -1) { String serviceType = p.substring(0, p.lastIndexOf('.')); String attribute = p.substring(p.lastIndexOf('.')+1); discovery.setAttribute(serviceType, attribute, properties.getProperty(p)); } } quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING)); super.configure(attributes); }