From 9ca446dd833ad5c2990c459593ed05e5bc9c33fc Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 7 Jun 2013 13:24:08 +0100 Subject: [PATCH] JAL-715 allow headless construction for testing --- src/jalview/ws/rest/RestClient.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/jalview/ws/rest/RestClient.java b/src/jalview/ws/rest/RestClient.java index ba6dbeb..061a3fa 100644 --- a/src/jalview/ws/rest/RestClient.java +++ b/src/jalview/ws/rest/RestClient.java @@ -76,9 +76,15 @@ public class RestClient extends WSClient implements WSClientI, public RestClient(RestServiceDescription service2, AlignFrame alignFrame) { + this(service2, alignFrame, false); + } + boolean headless = false; + public RestClient(RestServiceDescription service2, AlignFrame alignFrame, boolean nogui) + { service = service2; af = alignFrame; av = alignFrame.getViewport(); + headless = nogui; constructJob(); } @@ -285,9 +291,11 @@ public class RestClient extends WSClient implements WSClientI, if (jobsthread.isValid()) { - setWebserviceInfo(false); - wsInfo.setthisService(this); - jobsthread.setWebServiceInfo(wsInfo); + setWebserviceInfo(headless); + if (!headless) { + wsInfo.setthisService(this); + jobsthread.setWebServiceInfo(wsInfo); + } jobsthread.start(); } else -- 1.7.10.2