Class AppiumServerAvailabilityChecker
- java.lang.Object
-
- io.appium.java_client.service.local.AppiumServerAvailabilityChecker
-
public class AppiumServerAvailabilityChecker extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AppiumServerAvailabilityChecker.ConnectionError
static class
AppiumServerAvailabilityChecker.ConnectionTimeout
-
Constructor Summary
Constructors Constructor Description AppiumServerAvailabilityChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
waitUntilAvailable(java.net.URL serverStatusUrl, java.time.Duration timeout)
Verifies a possibility of establishing a connection to a running Appium server.
-
-
-
Method Detail
-
waitUntilAvailable
public boolean waitUntilAvailable(java.net.URL serverStatusUrl, java.time.Duration timeout) throws java.lang.InterruptedException
Verifies a possibility of establishing a connection to a running Appium server.- Parameters:
serverStatusUrl
- The URL of /status endpoint.timeout
- Wait timeout. If the server responds with non-200 error code then we are not going to retry, but throw an exception immediately.- Returns:
- true in case of success
- Throws:
java.lang.InterruptedException
- If the API is interruptedAppiumServerAvailabilityChecker.ConnectionTimeout
- If it is not possible to successfully open an HTTP connection to the server's /status endpoint.AppiumServerAvailabilityChecker.ConnectionError
- If an HTTP connection was opened successfully, but non-200 error code was received.
-
-