amelinium.http.server.undertow

added in 1.0.0

amelinium service, Undertow HTTP server support.

attach-handler

(attach-handler undertow-handler-fn options)(attach-handler existing-handler-wrapper undertow-handler-fn options)

Adds a handler to a custom handlers chain. Takes an existing wrapper (a function taking Ring handler and returning HttpHandler object), Undertow handler generator (a function taking options and returning new HttpHandler) and options. Returns a new wrapper which can replace the current one.

compress-handler

(compress-handler prev-handler {:keys [compress-predicate], :as options})

Returns gzip and deflate compress handler of type io.undertow.server.handlers.encoding.EncodingHandler.

main-handler-wrapper

(main-handler-wrapper options)

Takes options and returns a proper initial handler wrapper for Undertow adapter initializer (a function taking a Ring handler and returning HttpHandler object. It can return asynchronous or synchronous handler (depends on value of :async? boolean option). If :dispach? option is set, it will return a handler wrapped in a blocking operation, otherwise it will just set the handler without blocking wrapper.

parse-predicate

(parse-predicate s)

Takes a string and returns a predicate (Predicate). For an empty string or nil, returns a predicate which always matches.

resume

(resume k config old-config old-impl)

run

(run {:keys [enabled? port ssl? ssl-port compress? handler properties server-name keystore truststore same-key-passwords? key-password trust-password], :as options})

Runs Undertow server instance.

stop

(stop {:keys [server options]})

suspend

(suspend {:keys [server options], :as config})