com.testvagrant.optimuscloud.driver.SessionManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
The Java Client provides access to Optimus cloud for all java based projects.
package com.testvagrant.optimuscloud.driver;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class SessionManager {
private HttpURLConnection httpURLConnection;
private URL url;
public boolean isSessionUp(String sessionUrl) {
try {
URL url = new URL(sessionUrl);
httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setRequestMethod("HEAD");
int code = httpURLConnection.getResponseCode();
return true;
} catch (Exception e) {
return false;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy