com.emailage.javawrapper.utilities.AutoCloseableHttpsUrlConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of classic-api-client Show documentation
Show all versions of classic-api-client Show documentation
Emailage Classic API Java Client
package com.emailage.javawrapper.utilities;
import javax.net.ssl.HttpsURLConnection;
/**
* Simple wrapper for a connection to disconnect the connection when the resource block is exited.
*/
public class AutoCloseableHttpsUrlConnection implements AutoCloseable {
private HttpsURLConnection connection;
public AutoCloseableHttpsUrlConnection(HttpsURLConnection connection)
{
this.connection = connection;
}
@Override
public void close() throws Exception {
this.connection.disconnect();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy