*/
package jalview.rest;
+import jalview.bin.Jalview;
import jalview.httpserver.AbstractRequestHandler;
import java.io.IOException;
private static final String MY_NAME = "Rest";
/**
- * Singleton instance of this class
- */
- private static RestHandler instance = null;
-
- /**
* Returns the singleton instance of this class
*
* @return
{
synchronized (RestHandler.class)
{
- if (instance == null)
- {
- instance = new RestHandler();
- }
+ Jalview j = Jalview.getInstance();
+ return (j.restHandler == null ? j.restHandler = new RestHandler()
+ : j.restHandler);
}
- return instance;
}
/**