Advanced options specific to the Undertow web server used by Immutant


(graceful-shutdown handler timeout)

Creates an io.undertow.server.handlers/GracefulShutdownHandler with the passed HttpHandler and returns it, after adding an immutant.util/at-exit fn that prohibits new requests while waiting for pending ones to complete, up to a specified number of milliseconds


(http-handler handler)

Create an Undertow HttpHandler instance from a Ring handler function


Takes a map of Undertow-specific options and replaces them with an Undertow$Builder instance associated with :configuration. Three types of listeners are supported: :port (HTTP), :ssl-port (HTTPS), and :ajp-port (AJP)

The following keyword options are supported:

  • :configuration - the Builder that, if passed, will be used

Common to all listeners:

  • :host - the interface listener bound to, defaults to “localhost”


  • :port - a number, for a standard HTTP listener


  • :ajp-port - a number, for an Apache JServ Protocol listener


  • :ssl-port - a number, requires either :ssl-context, :keystore, or :key-managers

  • :keystore - the filepath (a String) to the keystore

  • :key-password - the password for the keystore
  • :truststore - if separate from the keystore
  • :trust-password - if :truststore passed
  • :ssl-context - a valid

  • :key-managers - a valid[]
  • :trust-managers - a valid[]
  • :client-auth - SSL client auth, may be :want or :need

  • :http2? - whether to enable HTTP 2.0 support


  • :io-threads - # threads handling IO, defaults to available processors
  • :worker-threads - # threads invoking handlers, defaults to (* io-threads 8)
  • :buffer-size - a number, defaults to 16k for modern servers
  • :buffers-per-region - a number, defaults to 10
  • :direct-buffers? - boolean, defaults to true