nextcloud-java-api
nextcloud-java-api copied to clipboard
lifecycle/shutdown
Currently, NextcloudConnector has a shutdown method that calls the static ConnectorCommon.shutdown();
That seem a bit weird if you have multiple NextcloudConnector instances that could be around at the same time: in that case you have to make sure you delay shutting down until all connectors have completed.
I guess we could add a helper that reference-counts how many NextcloudConnectors have been instantiated, and shut down ConnectorCommon only when the last one is shut down?