private static void updateRegion(Region region, String service, String host, boolean http, boolean https) { final Map<String, String> serviceEndpoints = region.getServiceEndpoints(); final Map<String, Boolean> httpSupport = region.getHttpSupport(); final Map<String, Boolean> httpsSupport = region.getHttpsSupport(); serviceEndpoints.put(service, host); httpSupport.put(service, http); httpsSupport.put(service, https); }
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 updateRegion(Region region, String service, String host, boolean http, boolean https) { final Map<String, String> serviceEndpoints = region.getServiceEndpoints(); final Map<String, Boolean> httpSupport = region.getHttpSupport(); final Map<String, Boolean> httpsSupport = region.getHttpsSupport(); serviceEndpoints.put(service, host); httpSupport.put(service, http); httpsSupport.put(service, https); }
private static void updateRegion(Region region, String service, String host, boolean http, boolean https) { final Map<String, String> serviceEndpoints = region.getServiceEndpoints(); final Map<String, Boolean> httpSupport = region.getHttpSupport(); final Map<String, Boolean> httpsSupport = region.getHttpsSupport(); serviceEndpoints.put(service, host); httpSupport.put(service, http); httpsSupport.put(service, https); }
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 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)); }