Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/main/java/org/aarboard/nextcloud/api/NextcloudConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.aarboard.nextcloud.api.webdav.pathresolver.WebDavPathResolver;
import org.aarboard.nextcloud.api.webdav.pathresolver.WebDavPathResolverBuilder;

public class NextcloudConnector {
public class NextcloudConnector implements AutoCloseable {

private final ServerConfig serverConfig;
private final ProvisionConnector pc;
Expand Down Expand Up @@ -188,6 +188,16 @@ public void shutdown() throws IOException {
ConnectorCommon.shutdown();
}

/**
* Close the HTTP client. Perform this to cleanly shut down this
* application.
*
* @throws Exception In case of errors
*/
public void close() throws Exception {
shutdown();
}

/**
* Trust all HTTPS certificates presented by the server. This is e.g. used
* to work against a Nextcloud instance with a self-signed certificate.
Expand Down