Module io.avaje.jex
Package io.avaje.jex

Interface JexConfig


public sealed interface JexConfig
Jex configuration.
  • Method Details

    • port

      JexConfig port(int port)
      Set the port to use. Defaults to 7001.
    • host

      JexConfig host(String host)
      Set the host to bind to.
    • contextPath

      JexConfig contextPath(String contextPath)
      Set the contextPath.
    • health

      JexConfig health(boolean health)
      Set to true to include the health endpoint. Defaults to true.
    • ignoreTrailingSlashes

      JexConfig ignoreTrailingSlashes(boolean ignoreTrailingSlashes)
      Set to true to ignore trailing slashes. Defaults to true.
    • preCompressStaticFiles

      JexConfig preCompressStaticFiles(boolean preCompressStaticFiles)
      Set to true to pre compress static files. Defaults to false.
    • jsonService

      JexConfig jsonService(JsonService jsonService)
      Set the JsonService to use.
    • renderer

      JexConfig renderer(String extension, TemplateRender renderer)
      Register a template renderer explicitly.
      Parameters:
      extension - The extension the renderer applies to.
      renderer - The template render to use for the given extension.
    • executor

      JexConfig executor(Executor executor)
      Set executor for serving requests.
    • executor

      Executor executor()
      Executor for serving requests. Defaults to a Executors.newVirtualThreadPerTaskExecutor()
    • port

      int port()
      Return the port to use.
    • host

      String host()
      Return the host to bind to.
    • contextPath

      String contextPath()
      Return the contextPath to use.
    • health

      boolean health()
      Return true to include the health endpoint.
    • ignoreTrailingSlashes

      boolean ignoreTrailingSlashes()
      Return true to ignore trailing slashes.
    • preCompressStaticFiles

      boolean preCompressStaticFiles()
      Return true if static files should be pre compressed.
    • jsonService

      JsonService jsonService()
      Return the JsonService.
    • sslContext

      SSLContext sslContext()
      Return the ssl context if https is enabled.
    • sslContext

      JexConfig sslContext(SSLContext ssl)
      Enable https with the provided SSLContext.
    • renderers

      Map<String,TemplateRender> renderers()
      Return the template renderers registered by extension.
    • compression

      JexConfig compression(Consumer<CompressionConfig> consumer)
    • compression

      CompressionConfig compression()