public ClassLoader getContextClassLoader() { return discoverer.getContextClassLoader(); }
public Collection<ServiceDeclaration> getServiceDeclarations(String name, boolean byRanking) throws IOException { Collection<ServiceDeclaration> declarations = getServiceDiscoverer().getServiceDeclarations(name); // declarations = removeDuplicateDeclarations(declarations); // Check if any of the service declarations has attributes that are overrided if (!serviceAttributes.isEmpty()) { for (ServiceDeclaration declaration : declarations) { Map<String, String> attrs = getAttributes(name); if (attrs != null) { declaration.getAttributes().putAll(attrs); } } } if (!byRanking) { return declarations; } if (!declarations.isEmpty()) { List<ServiceDeclaration> declarationList = new ArrayList<ServiceDeclaration>(declarations); Collections.sort(declarationList, ServiceComparator.DESCENDING_ORDER); return declarationList; } else { return Collections.emptyList(); } }
public Collection<ServiceDeclaration> getServiceDeclarations(String name, boolean byRanking) throws IOException { Collection<ServiceDeclaration> declarations = getServiceDiscoverer().getServiceDeclarations(name); // declarations = removeDuplicateDeclarations(declarations); // Check if any of the service declarations has attributes that are overrided if (!serviceAttributes.isEmpty()) { for (ServiceDeclaration declaration : declarations) { Map<String, String> attrs = getAttributes(name); if (attrs != null) { declaration.getAttributes().putAll(attrs); } } } if (!byRanking) { return declarations; } if (!declarations.isEmpty()) { List<ServiceDeclaration> declarationList = new ArrayList<ServiceDeclaration>(declarations); Collections.sort(declarationList, ServiceComparator.DESCENDING_ORDER); return declarationList; } else { return Collections.emptyList(); } }
public ClassLoader getContextClassLoader() { return discoverer.getContextClassLoader(); }