Interface SimpleServer

All Superinterfaces:
AutoCloseable, Closeable

public interface SimpleServer extends Closeable
Simple server facade providing convenient methods to obtain info about the server (i.e. port).
Since:
2.9
Author:
Michal Gajdos
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The port the server is listening to for incomming HTTP connections.
    boolean
    If this is true then very low level I/O operations are logged.
    void
    setDebug(boolean enable)
    To enable very low level logging this can be enabled.
    void
     

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • start

      void start() throws IOException
      Throws:
      IOException
    • getPort

      int getPort()
      The port the server is listening to for incomming HTTP connections. If the port is not specified the org.glassfish.jersey.server.spi.Container.DEFAULT_PORT is used.
      Returns:
      the port the server is listening on
    • isDebug

      boolean isDebug()
      If this is true then very low level I/O operations are logged. Typically this is used to debug I/O issues such as HTTPS handshakes or performance issues by analysing the various latencies involved in the HTTP conversation.

      There is a minimal performance penalty if this is enabled and it is perfectly suited to being enabled in a production environment, at the cost of logging overhead.

      Returns:
      true if debug is enabled, false otherwise.
      Since:
      2.23
    • setDebug

      void setDebug(boolean enable)
      To enable very low level logging this can be enabled. This goes far beyond logging issues such as connection establishment of request dispatch, it can trace the TCP operations latencies involved.
      Parameters:
      enable - if true debug tracing will be enabled.
      Since:
      2.23