@Test public void shouldAcceptValidQueueURL() { queueURLValidator.validate("tcp: }
public void validate(String queueUrl) { if (StringUtils.isBlank(queueUrl)) { throw new MotechConfigurationException("Queue URL cannot be null or empty."); } try { String value = queueUrl.replace("localhost", "127.0.0.1"); URI brokerURL = new URI(value); if (isCompositeURI(brokerURL)) { validateComposite(brokerURL, value); } else { isValidUri(queueUrl, value); } } catch (URISyntaxException e) { throw new MotechConfigurationException(URL_INVALID, e); } }
QueueURLValidator { public void validate(String queueUrl) { if (StringUtils.isBlank(queueUrl)) { throw new MotechConfigurationException("Queue URL cannot be null or empty."); } try { String value = queueUrl.replace("localhost", "127.0.0.1"); URI brokerURL = new URI(value); if (isCompositeURI(brokerURL)) { validateComposite(brokerURL, value); } else { isValidUri(queueUrl, value); } } catch (URISyntaxException e) { throw new MotechConfigurationException(URL_INVALID, e); } } }
QueueURLValidator { public void validate(String queueUrl) { if (StringUtils.isBlank(queueUrl)) { throw new MotechConfigurationException("Queue URL cannot be null or empty."); } try { String value = queueUrl.replace("localhost", "127.0.0.1"); URI brokerURL = new URI(value); if (isCompositeURI(brokerURL)) { validateComposite(brokerURL, value); } else { isValidUri(queueUrl, value); } } catch (URISyntaxException e) { throw new MotechConfigurationException(URL_INVALID, e); } } QueueURLValidator();  QueueURLValidator(UrlValidator urlValidator); }
QueueURLValidator { public void validate(String queueUrl) { if (StringUtils.isBlank(queueUrl)) { throw new MotechConfigurationException("Queue URL cannot be null or empty."); } try { String value = queueUrl.replace("localhost", "127.0.0.1"); URI brokerURL = new URI(value); if (isCompositeURI(brokerURL)) { validateComposite(brokerURL, value); } else { isValidUri(queueUrl, value); } } catch (URISyntaxException e) { throw new MotechConfigurationException(URL_INVALID, e); } } QueueURLValidator();  QueueURLValidator(UrlValidator urlValidator); void validate(String queueUrl); }
QueueURLValidator { public void validate(String queueUrl) { if (StringUtils.isBlank(queueUrl)) { throw new MotechConfigurationException("Queue URL cannot be null or empty."); } try { String value = queueUrl.replace("localhost", "127.0.0.1"); URI brokerURL = new URI(value); if (isCompositeURI(brokerURL)) { validateComposite(brokerURL, value); } else { isValidUri(queueUrl, value); } } catch (URISyntaxException e) { throw new MotechConfigurationException(URL_INVALID, e); } } QueueURLValidator();  QueueURLValidator(UrlValidator urlValidator); void validate(String queueUrl);  }