HttpsServer singleton
authorBobHanson <hansonr@stolaf.edu>
Mon, 8 Jun 2020 21:56:30 +0000 (16:56 -0500)
committerBobHanson <hansonr@stolaf.edu>
Mon, 8 Jun 2020 21:56:30 +0000 (16:56 -0500)
src/jalview/httpserver/HttpServer.java

index f2daf2b..b58b01f 100644 (file)
@@ -53,6 +53,20 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
  */
 public class HttpServer implements ApplicationSingletonI
 {
+  /**
+   * Returns the singleton instance of this class.
+   * 
+   * @return
+   * @throws BindException
+   */
+  public static HttpServer getInstance() throws BindException
+  {
+    synchronized (HttpServer.class)
+    {
+      return (HttpServer) ApplicationSingletonProvider
+              .getInstance(HttpServer.class);
+    }
+  }
   /*
    * 'context root' - actually just prefixed to the path for each handler for
    * now - see registerHandler
@@ -79,19 +93,6 @@ public class HttpServer implements ApplicationSingletonI
    */
   private URI contextRoot;
 
-  /**
-   * Returns the singleton instance of this class.
-   * 
-   * @return
-   * @throws BindException
-   */
-  public static HttpServer getInstance() throws BindException
-  {
-    synchronized (HttpServer.class)
-    {
-      return (HttpServer) ApplicationSingletonProvider.getInstance(HttpServer.class);
-    }
-  }
 
   /**
    * Private constructor to enforce use of singleton; use getInstance().