public class Connection
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
Connection(HttpClient client,
java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
<X> void |
addListener(Event<X> event,
java.util.function.Consumer<X> handler) |
void |
close() |
<X> java.util.concurrent.CompletableFuture<X> |
send(Target.SessionId sessionId,
Command<X> command) |
<X> X |
sendAndWait(Target.SessionId sessionId,
Command<X> command,
java.time.Duration timeout) |
public Connection(HttpClient client, java.lang.String url)
public <X> java.util.concurrent.CompletableFuture<X> send(Target.SessionId sessionId, Command<X> command)
public <X> X sendAndWait(Target.SessionId sessionId, Command<X> command, java.time.Duration timeout)
public <X> void addListener(Event<X> event, java.util.function.Consumer<X> handler)
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable