Class Server

java.lang.Object
is.galia.http.Server

public final class Server extends Object

Simple HTTP server wrapping a Jetty server. Supports HTTP and HTTPS and protocol versions 1.1 and 2.

The default handler serves static filesystem content, but can be overridden via setHandler(Handler).

N.B.: This is not the application server. (See ApplicationServer.

See Also:
  • Constructor Details

    • Server

      public Server()
      Initializes a static file HTTP(S) server using the image fixture path as its root.
  • Method Details

    • getHTTPURI

      public Reference getHTTPURI()
    • getHTTPSURI

      public Reference getHTTPSURI()
    • setAcceptingRanges

      public void setAcceptingRanges(boolean isAcceptingRanges)
    • setAuthRealm

      public void setAuthRealm(String realm)
    • setAuthSecret

      public void setAuthSecret(String secret)
    • setAuthUser

      public void setAuthUser(String user)
    • setBasicAuthEnabled

      public void setBasicAuthEnabled(boolean enabled)
    • setHandler

      public void setHandler(org.eclipse.jetty.server.Handler handler)
    • setHTTP1Enabled

      public void setHTTP1Enabled(boolean enabled)
    • setHTTP2Enabled

      public void setHTTP2Enabled(boolean enabled)
    • setHTTPS1Enabled

      public void setHTTPS1Enabled(boolean enabled)
    • setHTTPS2Enabled

      public void setHTTPS2Enabled(boolean enabled)
    • setKeyManagerPassword

      public void setKeyManagerPassword(String password)
    • setKeyStorePassword

      public void setKeyStorePassword(String password)
    • setKeyStorePath

      public void setKeyStorePath(Path path)
    • setRoot

      public void setRoot(Path root)
    • start

      public void start() throws Exception
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Throws:
      Exception