private boolean validateBroker(String host) { boolean result = true; if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) { // check the broker is still in the BrokerRegistry TransportConnector connector = CONNECTORS.get(host); if (BrokerRegistry.getInstance().lookup(host) == null || (connector != null && connector.getBroker().isStopped())) { result = false; // clean-up BROKERS.remove(host); SERVERS.remove(host); if (connector != null) { CONNECTORS.remove(host); if (connector != null) { ServiceSupport.dispose(connector); } } } } return result; } }
private boolean validateBroker(String host) { boolean result = true; if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) { // check the broker is still in the BrokerRegistry TransportConnector connector = CONNECTORS.get(host); if (BrokerRegistry.getInstance().lookup(host) == null || (connector != null && connector.getBroker().isStopped())) { result = false; // clean-up BROKERS.remove(host); SERVERS.remove(host); if (connector != null) { CONNECTORS.remove(host); if (connector != null) { ServiceSupport.dispose(connector); } } } } return result; } }
private boolean validateBroker(String host) { boolean result = true; if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) { // check the broker is still in the BrokerRegistry TransportConnector connector = CONNECTORS.get(host); if (BrokerRegistry.getInstance().lookup(host) == null || (connector != null && connector.getBroker().isStopped())) { result = false; // clean-up BROKERS.remove(host); SERVERS.remove(host); if (connector != null) { CONNECTORS.remove(host); if (connector != null) { ServiceSupport.dispose(connector); } } } } return result; } }
private boolean validateBroker(String host) { boolean result = true; if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) { // check the broker is still in the BrokerRegistry TransportConnector connector = CONNECTORS.get(host); if (BrokerRegistry.getInstance().lookup(host) == null || (connector != null && connector.getBroker().isStopped())) { result = false; // clean-up BROKERS.remove(host); SERVERS.remove(host); if (connector != null) { CONNECTORS.remove(host); if (connector != null) { ServiceSupport.dispose(connector); } } } } return result; } }
private boolean validateBroker(String host) { boolean result = true; if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) { // check the broker is still in the BrokerRegistry TransportConnector connector = CONNECTORS.get(host); if (BrokerRegistry.getInstance().lookup(host) == null || (connector != null && connector.getBroker().isStopped())) { result = false; // clean-up BROKERS.remove(host); SERVERS.remove(host); if (connector != null) { CONNECTORS.remove(host); if (connector != null) { ServiceSupport.dispose(connector); } } } } return result; } }