Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Finkbeiner2015-03-25 18:39:14 -0400
committerAndrew Finkbeiner2015-04-01 19:02:23 -0400
commitdd4882f80ca8a3140b829dd1d04f4e8eb793a467 (patch)
treed6b3c4ecc2b72453fc790c2c921ad53c981c35a6 /plugins/org.eclipse.osee.ote.master.rest.client
parent6bf2d821135ab0ae0afd78a2c4a167a4f4bd79b2 (diff)
downloadorg.eclipse.osee-dd4882f80ca8a3140b829dd1d04f4e8eb793a467.tar.gz
org.eclipse.osee-dd4882f80ca8a3140b829dd1d04f4e8eb793a467.tar.xz
org.eclipse.osee-dd4882f80ca8a3140b829dd1d04f4e8eb793a467.zip
feature[ats_ATS62328]: Update connection logic
Added the oteendpoint for communication with client to server. this is in preperation for removing rest/activemq from the default test server so that we can reduce thread usage and dependencies. Also added the ability to configure and connect to a server from the client using EventMessages. feature[ats_ATS107238]: Remove default rest server Updated some logging and added some more command handlers. Also cleaned up some server output. feature[ATS_ATS122200]: Add IO redirect Change-Id: If5a39333c1e0362f2c36cffe9f2c3e142881beea
Diffstat (limited to 'plugins/org.eclipse.osee.ote.master.rest.client')
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java2
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java7
4 files changed, 14 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.master.rest.client/META-INF/MANIFEST.MF
index 537aa2d4e0..1f63c91d2c 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/META-INF/MANIFEST.MF
@@ -6,10 +6,15 @@ Bundle-Version: 0.21.0.qualifier
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: javax.ws.rs;version="2.0.0",
+Import-Package: com.google.inject,
+ com.google.inject.binder,
+ com.google.inject.matcher,
+ com.google.inject.spi,
+ javax.ws.rs;version="2.0.0",
javax.ws.rs.client;version="2.0.0",
- javax.ws.rs.core,
+ javax.ws.rs.core;version="2.0.0",
org.eclipse.osee.framework.jdk.core.type,
+ org.eclipse.osee.jaxrs,
org.eclipse.osee.jaxrs.client,
org.eclipse.osee.ote.master.rest.model
Export-Package: org.eclipse.osee.ote.master.rest.client
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java
index 0dc70eee8c..eb08691b6d 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java
@@ -2,9 +2,11 @@ package org.eclipse.osee.ote.master.rest.client.internal;
import java.net.URI;
import java.util.concurrent.Callable;
+
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
+
import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult;
import org.eclipse.osee.ote.master.rest.model.OTEServer;
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java
index 685fb888a0..2a5e334b02 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java
@@ -6,6 +6,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
+
import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServer;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerAvailableNodes;
@@ -26,7 +27,7 @@ public class OTEMasterServerImpl implements OTEMasterServer {
public Thread newThread(Runnable arg0) {
Thread th = new Thread(arg0);
th.setName("OTE Master Client " + th.getId());
- th.setDaemon(true);
+ th.setDaemon(false);
return th;
}
});
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
index 764e541678..84bd404078 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
@@ -4,7 +4,6 @@ import java.net.URI;
import java.util.concurrent.Callable;
import javax.ws.rs.HttpMethod;
-import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import org.eclipse.osee.jaxrs.client.JaxRsClient;
@@ -27,12 +26,12 @@ public class RemoveServer implements Callable<OTEMasterServerResult> {
public OTEMasterServerResult call() throws Exception {
OTEMasterServerResult result = new OTEMasterServerResult();
try {
- URI targetUri = UriBuilder.fromUri(uri).path(OTEMasterServerImpl.CONTEXT_NAME).path(OTEMasterServerImpl.CONTEXT_SERVERS).path(server.getUUID().toString()).build();
- webClientProvider.target(targetUri).request(MediaType.APPLICATION_XML).method(HttpMethod.DELETE);
+ URI targetUri =
+ UriBuilder.fromUri(uri).path(OTEMasterServerImpl.CONTEXT_NAME).path(OTEMasterServerImpl.CONTEXT_SERVERS).path(server.getUUID().toString()).build();
+ webClientProvider.target(targetUri).request().method(HttpMethod.DELETE);
} catch (Throwable th) {
result.setSuccess(false);
result.setThrowable(th);
- th.printStackTrace();
}
return result;
}

Back to the top