Jalview-JS/JAL-3253-applet adds AlignFrameI empty interface to allow
[jalview.git] / src / jalview / httpserver / HttpServer.java
index 8797f33..8cb1846 100644 (file)
@@ -20,7 +20,8 @@
  */
 package jalview.httpserver;
 
-import jalview.bin.Instance;
+import jalview.bin.ApplicationSingletonProvider;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
 import jalview.rest.RestHandler;
 
 import java.net.BindException;
@@ -50,7 +51,7 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
  * @author gmcarstairs
  * @see http://eclipse.org/jetty/documentation/current/embedding-jetty.html
  */
-public class HttpServer
+public class HttpServer implements ApplicationSingletonI
 {
 
   /**
@@ -63,9 +64,7 @@ public class HttpServer
   {
     synchronized (HttpServer.class)
     {
-      Instance j = Instance.getInstance();
-      return (j.httpServer == null ? j.httpServer = new HttpServer()
-              : j.httpServer);
+      return (HttpServer) ApplicationSingletonProvider.getInstance(HttpServer.class);
     }
   }