29.12. Java SDK Best Practices
Instances of the
Api class should be shut down in a finally block to free daemon resources:
Api api = new Api(URL, USER, PASSWORD);
try {
api.getDataCenters().add(new DataCenter());
...
}
finally {
api.shutdown();
}