protected String getPublisherUrl() throws XPathExpressionException{ return automationContext.getContextUrls().getSecureServiceUrl().replace("services", "publisher/apis"); }
protected String getPublisherBaseUrl() throws XPathExpressionException { return automationContext.getContextUrls().getSecureServiceUrl().replace("services", "publisher"); }
protected String getAPIInvocationURLHttps(String apiContext) throws XPathExpressionException { return gatewayContextWrk.getContextUrls().getSecureServiceUrl().replace("/services", "") + "/" + apiContext; }
protected String getStoreUrl() throws XPathExpressionException{ return automationContext.getContextUrls().getSecureServiceUrl().replace("services", "store/apis"); }
protected String getStoreBaseUrl() throws XPathExpressionException { return automationContext.getContextUrls().getSecureServiceUrl().replace("services", "store"); }
protected String getServiceUrlHttps(String serviceName) throws XPathExpressionException { String serviceUrl = esContext.getContextUrls().getSecureServiceUrl() + "/" + serviceName; validateServiceUrl(serviceUrl, tenantInfo); return serviceUrl; }
tempUrl = contextUrls.getSecureServiceUrl(); if (tempUrl.contains("/t/")) { tempUrl = tempUrl.split("/t/")[0];
String backendURL = automationContext.getContextUrls().getSecureServiceUrl().replaceAll("(:\\d+)", ":" + httpsPort); User superUser = automationContext.getSuperTenant().getTenantAdmin(); ClientConnectionUtil.waitForLogin(backendURL, superUser);
public synchronized void restartGracefully() throws AutomationFrameworkException { try { int httpsPort = defaultHttpsPort + portOffset; //considering the port offset String backendURL = automationContext.getContextUrls().getSecureServiceUrl().replaceAll("(:\\d+)", ":" + httpsPort); User superUser = automationContext.getSuperTenant().getTenantAdmin(); ClientConnectionUtil.sendGraceFullRestartRequest(backendURL, superUser.getUserName() , superUser.getPassword()); } catch (XPathExpressionException e) { throw new AutomationFrameworkException("restart failed", e); } long time = System.currentTimeMillis() + DEFAULT_START_STOP_WAIT_MS; while (!inputStreamHandler.getOutput().contains(SERVER_SHUTDOWN_MESSAGE) && System.currentTimeMillis() < time) { // wait until server shutdown is completed } time = System.currentTimeMillis(); while (System.currentTimeMillis() < time + 5000) { //wait for port to close } try { ClientConnectionUtil.waitForPort( Integer.parseInt(automationContext.getInstance().getPorts().get("https")), automationContext.getInstance().getHosts().get("default")); ClientConnectionUtil.waitForLogin(automationContext); } catch (XPathExpressionException e) { throw new AutomationFrameworkException("Connection attempt to carbon server failed", e); } }