*/
package jalview.httpserver;
-import jalview.bin.Instance;
+import jalview.bin.ApplicationSingletonProvider;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import jalview.rest.RestHandler;
import java.net.BindException;
* @author gmcarstairs
* @see http://eclipse.org/jetty/documentation/current/embedding-jetty.html
*/
-public class HttpServer
+public class HttpServer implements ApplicationSingletonI
{
/**
{
synchronized (HttpServer.class)
{
- Instance j = Instance.getInstance();
- return (j.httpServer == null ? j.httpServer = new HttpServer()
- : j.httpServer);
+ return (HttpServer) ApplicationSingletonProvider.getInstance(HttpServer.class);
}
}