static Exporter<?> getExporter(Map<String, Exporter<?>> map, URL key) { Exporter<?> result = null; if (!key.getServiceKey().contains("*")) { result = map.get(key.getServiceKey()); } else { if (map != null && !map.isEmpty()) { for (Exporter<?> exporter : map.values()) { if (UrlUtils.isServiceKeyMatch(key, exporter.getInvoker().getUrl())) { result = exporter; break; } } } } if (result == null) { return null; } else if (ProtocolUtils.isGeneric( result.getInvoker().getUrl().getParameter(Constants.GENERIC_KEY))) { return null; } else { return result; } }
static Exporter<?> getExporter(Map<String, Exporter<?>> map, URL key) { Exporter<?> result = null; if (!key.getServiceKey().contains("*")) { result = map.get(key.getServiceKey()); } else { if (map != null && !map.isEmpty()) { for (Exporter<?> exporter : map.values()) { if (UrlUtils.isServiceKeyMatch(key, exporter.getInvoker().getUrl())) { result = exporter; break; } } } } if (result == null) { return null; } else if (ProtocolUtils.isGeneric( result.getInvoker().getUrl().getParameter(Constants.GENERIC_KEY))) { return null; } else { return result; } }
static Exporter<?> getExporter(Map<String, Exporter<?>> map, URL key) { Exporter<?> result = null; if (!key.getServiceKey().contains("*")) { result = map.get(key.getServiceKey()); } else { if (map != null && !map.isEmpty()) { for (Exporter<?> exporter : map.values()) { if (UrlUtils.isServiceKeyMatch(key, exporter.getInvoker().getUrl())) { result = exporter; break; } } } } if (result == null) { return null; } else if (ProtocolUtils.isGeneric(result.getInvoker().getUrl().getParameter(Constants.GENERIC_KEY))) { return null; } else { return result; } }
static Exporter<?> getExporter(Map<String, Exporter<?>> map, URL key) { Exporter<?> result = null; if (!key.getServiceKey().contains("*")) { result = map.get(key.getServiceKey()); } else { if (map != null && !map.isEmpty()) { for (Exporter<?> exporter : map.values()) { if (UrlUtils.isServiceKeyMatch(key, exporter.getInvoker().getUrl())) { result = exporter; break; } } } } if (result == null) { return null; } else if (ProtocolUtils.isGeneric( result.getInvoker().getUrl().getParameter(Constants.GENERIC_KEY))) { return null; } else { return result; } }
static Exporter<?> getExporter(Map<String, Exporter<?>> map, URL key) { Exporter<?> result = null; if (!key.getServiceKey().contains("*")) { result = map.get(key.getServiceKey()); } else { if (map != null && !map.isEmpty()) { for (Exporter<?> exporter : map.values()) { if (UrlUtils.isServiceKeyMatch(key, exporter.getInvoker().getUrl())) { result = exporter; break; } } } } if (result == null) { return null; } else if (ProtocolUtils.isGeneric( result.getInvoker().getUrl().getParameter(Constants.GENERIC_KEY))) { return null; } else { return result; } }