from develep
[jalview.git] / src / jalview / httpserver / HttpServer.java
index 8cb1846..b58b01f 100644 (file)
@@ -53,7 +53,6 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
  */
 public class HttpServer implements ApplicationSingletonI
 {
-
   /**
    * Returns the singleton instance of this class.
    * 
@@ -64,28 +63,10 @@ public class HttpServer implements ApplicationSingletonI
   {
     synchronized (HttpServer.class)
     {
-      return (HttpServer) ApplicationSingletonProvider.getInstance(HttpServer.class);
+      return (HttpServer) ApplicationSingletonProvider
+              .getInstance(HttpServer.class);
     }
   }
-
-  /**
-   * Private constructor to enforce use of singleton; use getInstance().
-   * 
-   * @throws BindException
-   *           if no free port can be assigned
-   */
-  private HttpServer() throws BindException
-  {
-    // use getInstance()
-
-    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
@@ -112,6 +93,25 @@ public class HttpServer implements ApplicationSingletonI
    */
   private URI contextRoot;
 
+
+  /**
+   * Private constructor to enforce use of singleton; use getInstance().
+   * 
+   * @throws BindException
+   *           if no free port can be assigned
+   */
+  private HttpServer() throws BindException
+  {
+    // use getInstance()
+
+    startServer();
+
+    /*
+     * Provides a REST server by default; add more programmatically as required
+     */
+    registerHandler(RestHandler.getInstance());
+  }
+
   /**
    * Start the http server
    *