diff options
author | jmisinco | 2013-08-15 22:40:39 +0000 |
---|---|---|
committer | jmisinco | 2013-08-15 22:40:39 +0000 |
commit | 850e587b5926ac294170303c8c6976fcd753f27f (patch) | |
tree | 9b0f610675ed1505199c26b894d1fc967fc2cc96 /plugins/org.eclipse.osee.framework.core.client | |
parent | 8c6dc526495d26c2e8e1b83fab6b3b3fb0ef9fa8 (diff) | |
download | org.eclipse.osee-850e587b5926ac294170303c8c6976fcd753f27f.tar.gz org.eclipse.osee-850e587b5926ac294170303c8c6976fcd753f27f.tar.xz org.eclipse.osee-850e587b5926ac294170303c8c6976fcd753f27f.zip |
feature[ats_ZPPTH]: Configure application server to use https
Change-Id: Ic303fd99ffca233b8a8976b9be7f1b559387cb8a
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.client')
2 files changed, 5 insertions, 22 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java index ad9782ba423..af8b55f581c 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ApplicationServer.java @@ -42,14 +42,14 @@ public class ApplicationServer extends OseeServer { public String getServerAddress() { if (serverAddress == null && serverInfo != null) { - serverAddress = String.format("http://%s:%s/", serverInfo.getServerAddress(), serverInfo.getPort()); + serverAddress = serverInfo.getUri().toString(); } return serverAddress; } public void checkAlive() { if (isServerInfoValid()) { - boolean alive = HttpProcessor.isAlive(serverInfo.getServerAddress(), serverInfo.getPort()); + boolean alive = HttpProcessor.isAlive(serverInfo.getUri()); setAlive(alive); if (alive) { set(Level.INFO, null, "%s %s Running Since: %s", getServerAddress(), diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java index 2ad23bc29d3..cbbbd55aca5 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/OseeApplicationServer.java @@ -14,8 +14,6 @@ package org.eclipse.osee.framework.core.client.internal; import java.sql.Timestamp; import java.util.Date; import java.util.logging.Level; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import org.eclipse.osee.framework.core.client.OseeClientProperties; import org.eclipse.osee.framework.core.data.OseeServerInfo; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -63,7 +61,9 @@ public class OseeApplicationServer { if (Strings.isValid(overrideValue)) { arbitrationServer.set(Level.INFO, null, "Arbitration Overridden"); try { - serverInfo = parseServerInfo(overrideValue); + serverInfo = + new OseeServerInfo("OVERRIDE", overrideValue, new String[] {"OVERRIDE"}, new Timestamp( + new Date().getTime()), true); } catch (Exception ex) { OseeLog.log(CoreClientActivator.class, Level.SEVERE, ex); applicationServer.set(Level.SEVERE, ex, "Error parsing arbitration server override [%s]", overrideValue); @@ -82,21 +82,4 @@ public class OseeApplicationServer { applicationServer.report(); } - private static OseeServerInfo parseServerInfo(String value) throws Exception { - OseeServerInfo toReturn = null; - String rawAddress = value; - if (rawAddress.startsWith("http")) { - rawAddress = value.replace("http://", ""); - } - Pattern pattern = Pattern.compile("(.*):(\\d+)"); - Matcher matcher = pattern.matcher(rawAddress); - if (matcher.find()) { - String address = matcher.group(1); - int port = Integer.valueOf(matcher.group(2)); - toReturn = - new OseeServerInfo("OVERRIDE", address, port, new String[] {"OVERRIDE"}, - new Timestamp(new Date().getTime()), true); - } - return toReturn; - } } |