Interface WebApplicationServer


public interface WebApplicationServer
A handle that provides lifecycle methods to a web application server.
  • Method Details

    • start

      void start() throws Exception
      Starts the server
      Throws:
      Exception - if the server fails to start
    • stop

      void stop() throws Exception
      Stops the server if the server fails to stop
      Throws:
      Exception
    • getConfiguration

      WebApplicationConfig getConfiguration()
      Returns the configuration for this web application server.
      Returns:
      the configuration
    • addListener

      void addListener(WebApplicationServerListener listener)
      Adds a listener to various events
      Parameters:
      listener - the listener to add
    • removeListener

      void removeListener(WebApplicationServerListener listener)
      Removes a listener to various events
      Parameters:
      listener - the listener to add
    • getPort

      int getPort()
      Get the local port the server is listening on for client connections. This allows returning the ephemeral port that the server is using if ephemeral ports are supported.
      Returns:
      socket port