private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName, Bus bus) { MultiplexDestination destination = null; ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class); if (null != serverRegistry) { List<Server> servers = serverRegistry.getServers(); for (Server s : servers) { QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName(); if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) { Destination dest = s.getDestination(); if (dest instanceof MultiplexDestination) { destination = (MultiplexDestination)dest; break; } } } } else { LOG.log(Level.WARNING, "Failed to locate service matching " + serviceQName + ", because the bus ServerRegistry extension provider is null"); } return destination; }
private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName, Bus bus) { MultiplexDestination destination = null; ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class); if (null != serverRegistry) { List<Server> servers = serverRegistry.getServers(); for (Server s : servers) { QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName(); if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) { Destination dest = s.getDestination(); if (dest instanceof MultiplexDestination) { destination = (MultiplexDestination)dest; break; } } } } else { LOG.log(Level.WARNING, "Failed to locate service matching " + serviceQName + ", because the bus ServerRegistry extension provider is null"); } return destination; }