From: Jim Procter Date: Fri, 7 Jun 2013 12:24:08 +0000 (+0100) Subject: JAL-715 allow headless construction for testing X-Git-Tag: Jalview_2_9~248^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9ca446dd833ad5c2990c459593ed05e5bc9c33fc;p=jalview.git JAL-715 allow headless construction for testing --- 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