Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java')
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java36
1 files changed, 15 insertions, 21 deletions
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 533201e202a..c7993e93ed4 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
@@ -5,7 +5,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.WebClientProvider;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServer;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerAvailableNodes;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult;
@@ -15,12 +15,16 @@ public class OTEMasterServerImpl implements OTEMasterServer {
static final String CONTEXT_NAME = "otemaster";
static final String CONTEXT_SERVERS = "servers";
-
+
private WebClientProvider webClientProvider;
private ExecutorService executor;
-
- public OTEMasterServerImpl(){
- executor = Executors.newCachedThreadPool(new ThreadFactory(){
+
+ public void setWebClientProvider(WebClientProvider webClientProvider) {
+ this.webClientProvider = webClientProvider;
+ }
+
+ public void start() {
+ executor = Executors.newCachedThreadPool(new ThreadFactory() {
@Override
public Thread newThread(Runnable arg0) {
Thread th = new Thread(arg0);
@@ -30,23 +34,13 @@ public class OTEMasterServerImpl implements OTEMasterServer {
}
});
}
-
- public void start(){
-
- }
-
- public void stop(){
-
- }
-
- public void bindWebClientProvider(WebClientProvider webClientProvider){
- this.webClientProvider = webClientProvider;
- }
-
- public void unbindWebClientProvider(WebClientProvider webClientProvider){
- this.webClientProvider = null;
+
+ public void stop() {
+ if (executor != null) {
+ executor.shutdown();
+ }
}
-
+
@Override
public Future<OTEMasterServerAvailableNodes> getAvailableServers(URI uri) {
return executor.submit(new GetAvailableServers(webClientProvider, uri));

Back to the top