JAL-3446 from JAL-3253 ApplicationSingletonProvider missing for
[jalview.git] / src / jalview / httpserver / HttpServer.java
index 9a59bda..7021fae 100644 (file)
@@ -66,6 +66,24 @@ public class HttpServer implements ApplicationSingletonI
       return (HttpServer) ApplicationSingletonProvider.getInstance(HttpServer.class);
     }
   }
+  
+  /**
+   * Private constructor to enforce use of singleton
+   * 
+   * @throws BindException
+   *           if no free port can be assigned
+   */
+  private HttpServer() throws BindException
+  {
+    startServer();
+
+    /*
+     * Provides a REST server by default; add more programmatically as required
+     */
+    registerHandler(RestHandler.getInstance());
+  }
+
+
   /*
    * 'context root' - actually just prefixed to the path for each handler for
    * now - see registerHandler
@@ -94,22 +112,6 @@ public class HttpServer implements ApplicationSingletonI
 
 
   /**
-   * Private constructor to enforce use of singleton
-   * 
-   * @throws BindException
-   *           if no free port can be assigned
-   */
-  private HttpServer() throws BindException
-  {
-    startServer();
-
-    /*
-     * Provides a REST server by default; add more programmatically as required
-     */
-    registerHandler(RestHandler.getInstance());
-  }
-
-  /**
    * Start the http server
    * 
    * @throws BindException