Testing Method structure

This commit is contained in:
2026-02-19 16:24:57 +01:00
parent 9342bf42c5
commit b1198e89d6
6 changed files with 89 additions and 1 deletions
@@ -7,6 +7,7 @@ import dev.selimaj.session.types.Message;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.WebSocket;
import java.util.concurrent.CompletableFuture;
public final class Session {
@@ -45,6 +46,13 @@ public final class Session {
listener.notify(ws, method, data);
}
public <Req, Res> CompletableFuture<Res> request(
String method,
Req data,
Class<Res> resType) throws Exception {
return listener.request(ws, method, data, resType);
}
public void close() throws Exception {
ws.sendClose(0, "Session closed");
}