APIClient¶
-
public final class
APIClient¶ This class permits users to access the API methods. Note that whilst APIClient is threadsafe, other API objects are not unless they explicitly state otherwise.
Methods¶
addListener¶
-
public synchronized void
addListener(ServerStatusListener listener)¶
removeListener¶
-
public synchronized void
removeListener(ServerStatusListener listener)¶
startServer¶
-
public void
startServer(String serverPath)¶ Starts the server process on the given path. This must be called before creating any instances of APIClient.
Parameters: - serverPath – an absolute path to the coco-platform-server executable. This will be passed directly to the the constructor of ProcessBuilder.
Throws: - IOException – if any error is encountered whilst trying to start the server.