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.
 
startServer¶
- 
public void 
startServer(String serverPath, String licensesPath, boolean allowLicenseServer)¶ 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.
 - licensesPath – an absolute path to where the coco license can be found, if they are stored in a non-standard location. This is equivalent to the –override-licenses option to coco.
 
Throws: - IOException – if any error is encountered whilst trying to start the server.