private static void addRegionEndpoint( final InMemoryRegionImpl region, final Element endpointElement, final boolean endpointVerification) { String serviceName = getChildElementValue(SERVICE_TAG, endpointElement); String hostname = getChildElementValue(HOSTNAME_TAG, endpointElement); String http = getChildElementValue(HTTP_TAG, endpointElement); String https = getChildElementValue(HTTPS_TAG, endpointElement); if ( endpointVerification && !verifyLegacyEndpoint(hostname) ) { throw new IllegalStateException("Invalid service endpoint (" + hostname + ") is detected."); } region.addEndpoint(serviceName, hostname); if (Boolean.valueOf(http)) { region.addHttp(serviceName); } if (Boolean.valueOf(https)) { region.addHttps(serviceName); } }
private static Region parseRegionElement( final Element regionElement, final boolean endpointVerification) { String name = getChildElementValue(REGION_ID_TAG, regionElement); String domain = getChildElementValue(DOMAIN_TAG, regionElement); InMemoryRegionImpl regionImpl = new InMemoryRegionImpl(name, domain); NodeList endpointNodes = regionElement.getElementsByTagName(ENDPOINT_TAG); for (int i = 0; i < endpointNodes.getLength(); i++) { addRegionEndpoint(regionImpl, (Element) endpointNodes.item(i), endpointVerification); } return new Region(regionImpl); }
private static Region parseRegionElement( final Element regionElement, final boolean endpointVerification) { String name = getChildElementValue(REGION_ID_TAG, regionElement); String domain = getChildElementValue(DOMAIN_TAG, regionElement); Region region = new Region(name, domain); NodeList endpointNodes = regionElement.getElementsByTagName(ENDPOINT_TAG); for (int i = 0; i < endpointNodes.getLength(); i++) { addRegionEndpoint(region, (Element) endpointNodes.item(i), endpointVerification); } return region; }
private static void addRegionEndpoint( final Region region, final Element endpointElement, final boolean endpointVerification) { String serviceName = getChildElementValue(SERVICE_TAG, endpointElement); String hostname = getChildElementValue(HOSTNAME_TAG, endpointElement); String http = getChildElementValue(HTTP_TAG, endpointElement); String https = getChildElementValue(HTTPS_TAG, endpointElement); if (endpointVerification && !verifyLegacyEndpoint(hostname)) { throw new IllegalStateException("Invalid service endpoint (" + hostname + ") is detected."); } region.getServiceEndpoints().put(serviceName, hostname); region.getHttpSupport().put(serviceName, "true".equals(http)); region.getHttpsSupport().put(serviceName, "true".equals(https)); }
private static void addRegionEndpoint( final InMemoryRegionImpl region, final Element endpointElement, final boolean endpointVerification) { String serviceName = getChildElementValue(SERVICE_TAG, endpointElement); String hostname = getChildElementValue(HOSTNAME_TAG, endpointElement); String http = getChildElementValue(HTTP_TAG, endpointElement); String https = getChildElementValue(HTTPS_TAG, endpointElement); if ( endpointVerification && !verifyLegacyEndpoint(hostname) ) { throw new IllegalStateException("Invalid service endpoint (" + hostname + ") is detected."); } region.addEndpoint(serviceName, hostname); if (Boolean.valueOf(http)) { region.addHttp(serviceName); } if (Boolean.valueOf(https)) { region.addHttps(serviceName); } }
private static Region parseRegionElement( final Element regionElement, final boolean endpointVerification) { String name = getChildElementValue(REGION_ID_TAG, regionElement); String domain = getChildElementValue(DOMAIN_TAG, regionElement); InMemoryRegionImpl regionImpl = new InMemoryRegionImpl(name, domain); NodeList endpointNodes = regionElement.getElementsByTagName(ENDPOINT_TAG); for (int i = 0; i < endpointNodes.getLength(); i++) { addRegionEndpoint(regionImpl, (Element) endpointNodes.item(i), endpointVerification); } return new Region(regionImpl); }
private static void addRegionEndpoint( final Region region, final Element endpointElement, final boolean endpointVerification) { String serviceName = getChildElementValue(SERVICE_TAG, endpointElement); String hostname = getChildElementValue(HOSTNAME_TAG, endpointElement); String http = getChildElementValue(HTTP_TAG, endpointElement); String https = getChildElementValue(HTTPS_TAG, endpointElement); if (endpointVerification && !verifyLegacyEndpoint(hostname)) { throw new IllegalStateException("Invalid service endpoint (" + hostname + ") is detected."); } region.getServiceEndpoints().put(serviceName, hostname); region.getHttpSupport().put(serviceName, "true".equals(http)); region.getHttpsSupport().put(serviceName, "true".equals(https)); }
private static Region parseRegionElement( final Element regionElement, final boolean endpointVerification) { String name = getChildElementValue(REGION_ID_TAG, regionElement); String domain = getChildElementValue(DOMAIN_TAG, regionElement); Region region = new Region(name, domain); NodeList endpointNodes = regionElement.getElementsByTagName(ENDPOINT_TAG); for (int i = 0; i < endpointNodes.getLength(); i++) { addRegionEndpoint(region, (Element) endpointNodes.item(i), endpointVerification); } return region; }
private static void addRegionEndpoint( final Region region, final Element endpointElement, final boolean endpointVerification) { String serviceName = getChildElementValue(SERVICE_TAG, endpointElement); String hostname = getChildElementValue(HOSTNAME_TAG, endpointElement); String http = getChildElementValue(HTTP_TAG, endpointElement); String https = getChildElementValue(HTTPS_TAG, endpointElement); if (endpointVerification && !verifyLegacyEndpoint(hostname)) { throw new IllegalStateException("Invalid service endpoint (" + hostname + ") is detected."); } region.getServiceEndpoints().put(serviceName, hostname); region.getHttpSupport().put(serviceName, "true".equals(http)); region.getHttpsSupport().put(serviceName, "true".equals(https)); }
private static Region parseRegionElement( final Element regionElement, final boolean endpointVerification) { String name = getChildElementValue(REGION_ID_TAG, regionElement); String domain = getChildElementValue(DOMAIN_TAG, regionElement); Region region = new Region(name, domain); NodeList endpointNodes = regionElement.getElementsByTagName(ENDPOINT_TAG); for (int i = 0; i < endpointNodes.getLength(); i++) { addRegionEndpoint(region, (Element) endpointNodes.item(i), endpointVerification); } return region; }
private static Region parseRegionElement( final Element regionElement, final boolean endpointVerification) { String name = getChildElementValue(REGION_ID_TAG, regionElement); String domain = getChildElementValue(DOMAIN_TAG, regionElement); InMemoryRegionImpl regionImpl = new InMemoryRegionImpl(name, domain); NodeList endpointNodes = regionElement.getElementsByTagName(ENDPOINT_TAG); for (int i = 0; i < endpointNodes.getLength(); i++) { addRegionEndpoint(regionImpl, (Element) endpointNodes.item(i), endpointVerification); } return new Region(regionImpl); }
private static void addRegionEndpoint( final InMemoryRegionImpl region, final Element endpointElement, final boolean endpointVerification) { String serviceName = getChildElementValue(SERVICE_TAG, endpointElement); String hostname = getChildElementValue(HOSTNAME_TAG, endpointElement); String http = getChildElementValue(HTTP_TAG, endpointElement); String https = getChildElementValue(HTTPS_TAG, endpointElement); if ( endpointVerification && !verifyLegacyEndpoint(hostname) ) { throw new IllegalStateException("Invalid service endpoint (" + hostname + ") is detected."); } region.addEndpoint(serviceName, hostname); if (Boolean.valueOf(http)) { region.addHttp(serviceName); } if (Boolean.valueOf(https)) { region.addHttps(serviceName); } }