java.lang.Object
one.jpro.platform.auth.core.http.impl.JProServerImpl
All Implemented Interfaces:
AutoCloseable, HttpServer

public class JProServerImpl extends Object implements HttpServer
Implementation of the HttpServer interface when running the application via JPro server.
  • Constructor Details

    • JProServerImpl

      public JProServerImpl(@NotNull @NotNull com.jpro.webapi.WebAPI webAPI)
      Creates a new instance with the specified WebAPI.
      Parameters:
      webAPI - The WebAPI instance to use.
      Throws:
      NullPointerException - if the webAPI parameter is null.
  • Method Details

    • start

      public void start()
      Description copied from interface: HttpServer
      Starts the server. If the application is running in a browser via JPro server, then this method does nothing.
      Specified by:
      start in interface HttpServer
    • stop

      public void stop()
      Description copied from interface: HttpServer
      Stops the server. If the application is running in a browser via JPro server, then this method does nothing.
      Specified by:
      stop in interface HttpServer
    • getServerHost

      public String getServerHost()
      Description copied from interface: HttpServer
      Return the server host.
      Specified by:
      getServerHost in interface HttpServer
      Returns:
      the server host
    • getServerPort

      public int getServerPort()
      Description copied from interface: HttpServer
      Return the server port.
      Specified by:
      getServerPort in interface HttpServer
      Returns:
      the server port
    • getFullRequestedURL

      public String getFullRequestedURL()
      Description copied from interface: HttpServer
      Return the full URL (with query string) the client used to request the server.
      Specified by:
      getFullRequestedURL in interface HttpServer
      Returns:
      the URL
    • openURL

      public CompletableFuture<String> openURL(@NotNull @NotNull String url)
      Description copied from interface: HttpServer
      Opens the given URL string in the browser.
      Specified by:
      openURL in interface HttpServer
      Parameters:
      url - the URL string to open