Interface ServerHandle

All Known Implementing Classes:
ServerLifecycle

public interface ServerHandle
Public handle to the underlying HTTP transport. Returned by create(dev.relism.flash.extension.FlashConfiguration, dev.relism.flash.routing.AbstractRouter, dev.relism.flash.routing.AbstractWsRouter) so that FlashApp can start and stop the server without holding a direct reference to the transport's internal composition
  • Method Details

    • start

      void start()
      Starts the accept loop on a background platform thread. Returns immediately.
    • startAndBlock

      void startAndBlock()
      Starts the accept loop and blocks the calling thread until the server is stopped. Suitable for use in main() when no other work is needed after startup.
    • stop

      Gracefully stops the server, draining active connections.
    • create

      static ServerHandle create(FlashConfiguration config, AbstractRouter httpRouter, AbstractWsRouter wsRouter) throws IOException
      Throws:
      IOException