preparing for a conceptual refactoring...

This commit is contained in:
Relism
2026-03-28 14:11:12 +01:00
parent 7b996b552b
commit 2edd68b0aa
60 changed files with 3432 additions and 518 deletions
@@ -0,0 +1,26 @@
package dev.relism;
import dev.relism.extension.FlashConfiguration;
import dev.relism.routing.GlobalRouter;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
/**
* Public handle to the underlying HTTP transport. Returned by {@link #create} so that
* {@link dev.relism.extension.FlashApp} can start and stop the server without holding
* a direct reference to the package-private {@link HttpServer}.
*/
public interface ServerHandle {
CompletableFuture<Void> start();
CompletableFuture<Void> stop();
/**
* Creates the HTTP transport. Called exclusively by
* {@link dev.relism.extension.FlashApp}.
*/
static ServerHandle create(FlashConfiguration config, GlobalRouter router) throws IOException {
return new HttpServer(config, router);
}
}