3 import java.net.BindException;
4 import java.util.HashMap;
7 import jalview.bin.Cache;
9 public class API extends RestHandler
11 private static final String MY_PATH = "api";
13 private static final String MY_NAME = "Jalview API";
15 private static Map<String, Status> statusMap = new HashMap<>();
17 private static Map<String, String> requestMap = new HashMap<>();
19 private static API instance = null;
21 public static API getInstance() throws BindException
23 synchronized (API.class)
33 private API() throws BindException
38 private boolean init = false;
41 protected void init() throws BindException
48 addEndpoint(new FetchSequenceEndpoint(this));
49 addEndpoint(new OpenAlignmentEndpoint(this));
50 addEndpoint(new HighlightSequenceEndpoint(this));
52 Cache.info("REMOVEME setting path to " + MY_PATH);
53 Cache.info("REMOVEME endpoints keys:");
54 for (String key : getEndpoints().keySet())
56 Cache.info("REMOVEME keyname=" + key);
59 this.registerHandler();
65 * Shared methods below here
69 public String getPath()
74 protected static Map<String, Status> getStatusMap()
79 protected static Map<String, String> getRequestMap()