*/
public class HttpServer
{
- /*
- * 'context root' - actually just prefixed to the path for each handler for
- * now - see registerHandler
- */
- private static final String JALVIEW_PATH = "jalview";
/**
* Returns the singleton instance of this 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
+ */
+ private static final String JALVIEW_PATH = "jalview";
+
/*
* The Http server
*/
private URI contextRoot;
/**
- * 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