mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-22 13:47:02 +00:00
WebDriverBiDi: move isAlive() onto the interface
This commit is contained in:
1 parent
c743cc0a78
commit
7ca3574b1b
2 files changed
+6
-3
No files matched your search
@@ -175,9 +175,7 @@ public class LocalWebDriverBiDi implements WebDriverBiDi, Closeable {
|
||||
return future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the browser process is running and the WebDriver connection is still open.
|
||||
*/
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
return process.isAlive() && !webSocket.isInputClosed() && !webSocket.isOutputClosed();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ package org.archive.net.webdriver;
|
||||
public interface WebDriverBiDi {
|
||||
<T extends BiDiModule> T module(Class<T> moduleClass);
|
||||
|
||||
/**
|
||||
* Returns true if the browser is running and the WebDriver connection is still open.
|
||||
*/
|
||||
boolean isAlive();
|
||||
|
||||
default Browser browser() {
|
||||
return module(Browser.class);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user