Package org.openqa.selenium.devtools
Class Connection
- java.lang.Object
-
- org.openqa.selenium.devtools.Connection
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
SeleniumCdpConnection
public class Connection extends java.lang.Object implements java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description Connection(org.openqa.selenium.remote.http.HttpClient client, java.lang.String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> void
addListener(Event<X> event, java.util.function.Consumer<X> handler)
void
clearListeners()
void
close()
<X> java.util.concurrent.CompletableFuture<X>
send(SessionID sessionId, Command<X> command)
<X> X
sendAndWait(SessionID sessionId, Command<X> command, java.time.Duration timeout)
-
-
-
Method Detail
-
send
public <X> java.util.concurrent.CompletableFuture<X> send(SessionID sessionId, Command<X> command)
-
sendAndWait
public <X> X sendAndWait(SessionID sessionId, Command<X> command, java.time.Duration timeout)
-
addListener
public <X> void addListener(Event<X> event, java.util.function.Consumer<X> handler)
-
clearListeners
public void clearListeners()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-